Skip to content

Instantly share code, notes, and snippets.

View imcodingideas's full-sized avatar
🎯
I may be slow to respond.

Joseph Chambers imcodingideas

🎯
I may be slow to respond.
View GitHub Profile
/**
* Created by joseph on 5/30/16.
*/
//store name in a variable
var firstName = "Joseph";
var lastName = "Chambers";
var age = 32;
var fullName = firstName + lastName;
alert(fullName + "is " + age);
/**
* Created by joseph on 5/30/16.
*/
alert( "Thanks for your input!" );
@imcodingideas
imcodingideas / scope.js
Created May 31, 2016 04:14
javascript scope on http://nodeschjavascript scope on http://nodeschool.io/ scope exersise for a user on reddit https://www.reddit.com/r/learnjavascript/comments/4lt3yf/help_javascript_scope_not_as_expected_what/ool.io/ scope exersise
var a = 1, b = 2, c = 3;
var start = (function firstFunction(){
var b = 5, c = 6;
var obj = {};
obj.firstFunction = function () {
return c;
};
@imcodingideas
imcodingideas / block-facebook
Created June 5, 2016 20:24
Hosts file to block facebook
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net
@imcodingideas
imcodingideas / chatbot.rb
Created June 15, 2016 02:30
Little chatbot learning some of the control flow in ruby.
chat_bot = "Ruby"
age = 32
city = "Hermosillo"
puts "Hello! My name is #{chat_bot}"
puts "What is your name?"
username = gets.chomp
puts "Hi there #{username}, great to meet you! How can I help you today?"
question = gets.chomp
#usa {
border-bottom: 16m solid gray;
}
.muslims {
display: none !important;
}
.woman {
font-size: xx-small;
@imcodingideas
imcodingideas / app.js
Last active June 25, 2016 03:04
credit card sum
/**
* Created by joseph on 6/6/16.
*/
function printNumbers(arrayOfCards) {
var reducedCards = [];
// iterate over array of cards that was passed to function
arrayOfCards.forEach(function(card){
@imcodingideas
imcodingideas / keywordCleanup.js
Last active July 9, 2016 04:30
Modified version of https://gist.github.com/russorat/804f026339668cc91a47 to support non MccApp accounts
function main() {
var config_options = {
'default' : {
metric : 'Conversions', // This metric will be used for determining duds
threshold : 0, // Duds are less than or equal to this threshold
days_ago : 90, // The timeframe of the data to consider, days ago to yesterday
days_in_limbo : 5 // The script will warn you for this many days before deleting something
}
};
//MccApp.accounts().executeInParallel('findKeywordsToDelete', 'generateReport', JSON.stringify(config_options))
@imcodingideas
imcodingideas / something.js
Created November 7, 2017 05:22
I would have just done something like this
const styles = {
cell: {
backgroundColor: color,
height: height,
width: width,
borderColor: '#000',
alignItems: 'center',
justifyContent: 'center'
},
numberText: {

Exercise 1: Form validation

Hypothesis: Adding form validation to the "name" and "message" fields of the email form will increase form submissions.

Device type: Desktop only

URL: http://surefoot.me/engineer-application-sandbox/

Dev notes:

  • Currently, the form only checks for a valid email address.
  • Please execute your code on DOM ready and use AJAX to handle validation.