View logger.js
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'); |
View linkedList.js
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; | |
}, |
View gist:d473ccc6270eba16cdcf
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'); |
View gist:aceb9d83c3769d113853
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 | |
} | |
} | |
}; |
View gist:c77c65ac881da9e82f41
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 execMultiple = function (regex, str) { | |
var match = regex.exec(str); | |
var matches = []; | |
while (match != null) { | |
matches.push(match); | |
match = regex.exec(str); | |
} | |
return matches; | |
}; |
View .slate.js
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
slate.configAll({ | |
'defaultToCurrentScreen': true, | |
'checkDefaultsOnLoad': true | |
}); | |
var layout = { | |
maximize: S.op('move', { | |
'x' : 'screenOriginX', | |
'y' : 'screenOriginY', | |
'width' : 'screenSizeX', |
View .gitconfig
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
[user] | |
name = Alexander Gugel | |
email = alexander.gugel@gmail.com | |
[alias] | |
lazy = !git add -A && git commit -m 'Too lazy for a commit message' | |
yolo = push origin master --force | |
back = revert HEAD | |
pom = !git pull origin master && git push origin master | |
shit = reset --hard HEAD |
View gist:a20d920f6c4e059c6cb4
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
<h2>Buttons</h2> | |
<button class="white">white</button> | |
<button class="red">red</button> | |
<button class="pink">pink</button> | |
<button class="purple">purple</button> | |
<button class="deep-purple">deep-purple</button> | |
<button class="indigo">indigo</button> | |
<button class="blue">blue</button> | |
<button class="light-blue">light-blue</button> | |
<button class="cyan">cyan</button> |
View gist:f3a20f8dc42f4726e0d0
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 class="card depth-0">card depth-0</div> | |
<div class="card depth-1">card depth-1</div> | |
<div class="card depth-2">card depth-2</div> | |
<div class="card depth-3">card depth-3</div> | |
<div class="card depth-4">card depth-4</div> | |
<div class="card depth-5">card depth-5</div> |
View ping.go
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
// Start using | |
// go run ping.go -addr=:3141 | |
// Query using | |
// nc -u localhost 3141 | |
package main | |
import ( | |
"log" | |
"net" |
OlderNewer