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'); |
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
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
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 execMultiple = function (regex, str) { | |
var match = regex.exec(str); | |
var matches = []; | |
while (match != null) { | |
matches.push(match); | |
match = regex.exec(str); | |
} | |
return matches; | |
}; |
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', |
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 |
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> |
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> |
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