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 object = { | |
hello: 'world', | |
hallo: { | |
german: 'welt', | |
test: { | |
test: true, | |
test: false | |
} | |
} | |
}; |
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 crypto = require('crypto'); | |
var getGravatarImage = function (email) { | |
return ('//www.gravatar.com/avatar/' + md5(email)).trim(); | |
}; | |
var md5 = function (str) { | |
var hash = crypto.createHash('md5'); | |
hash.update(str.toLowerCase().trim()); | |
return hash.digest('hex'); |
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
// PoC: Implemented methods: addToTail(value), removeHead() #=> value, contains(value) #=> boolean | |
var tail = { | |
next: this, | |
removeHead: function () { | |
return null; | |
}, | |
contains: function (value) { | |
return false; | |
}, |
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
// Usage: | |
// var logger = require('./logger'); | |
// logger.debug('Debug message'); | |
// logger.info('Info message'); | |
// logger.warn('Warn message'); | |
// logger.error('Error message'); | |
// logger.addLevels({ | |
// silly: 'white' | |
// }); | |
// logger.silly('Silly message'); |
NewerOlder