This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyModule | |
def first_module_method | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('div').on("click", function() { | |
console.log("I'm a callback function and I'm currently getting called!"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dirListModule.js | |
var fs = require('fs'); //require node filesystem module | |
var path = require('path'); //require node path module (a couple of tools for reading path names) | |
module.exports = function filterDirFiles(pathSupplied, extFilter, callback) { | |
function extension(element) { | |
var extName = path.extname(element); | |
return extName === '.' + extFilter; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dirListModule = require('./dirListModule.js') | |
var dirPath = process.argv[2]; | |
var extFilter = process.argv[3]; | |
dirListModule(dirPath, extFilter, function(err, filteredList) { | |
filteredList.forEach(function(value) { | |
console.log(value); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
.bar { | |
fill: steelblue; | |
} | |
.axis text { | |
font: 10px sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"event":"first visit","properties":{"time":1389806707,"distinct_id":"14398a6d7eb77-0308ffb76-6e1a2776-384000-14398a6d7ec2b4","$browser":"Chrome","$city":"New York","$initial_referrer":"$direct","$initial_referring_domain":"$direct","$os":"Mac OS X","$region":"New York","date":{},"mp_country_code":"US","mp_lib":"web","url":"http://devolate.com/"}} | |
{"event":"first visit","properties":{"time":1389806825,"distinct_id":"14398a8a47aa-094bd1e04-6e1a2776-384000-14398a8a47b421","$browser":"Chrome","$city":"New York","$initial_referrer":"$direct","$initial_referring_domain":"$direct","$os":"Mac OS X","$region":"New York","date":{},"mp_country_code":"US","mp_lib":"web","url":"http://devolate.com/"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Engine | |
def run | |
puts "GRRRRRRRRR" | |
end | |
end | |
class Vehicle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.upto(100) do |i| | |
if i % 3 == 0 | |
puts "fizz" | |
elsif i % 5 == 0 | |
puts "buzz" | |
elsif i % 3 == 0 && i % 5 == 0 | |
puts "fizzbuzz" | |
else | |
puts i | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(var i = 0; i < 10; i++){ | |
console.log(i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9.times do |i| | |
puts i | |
end |
OlderNewer