This file contains hidden or 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 hidden or 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 = [email protected] | |
[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 hidden or 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 hidden or 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 hidden or 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
// Port, host and auth token of Redis server might be defined as environment | |
// variables. If not, fall back to defaults. | |
var redisPort = process.env.REDIS_PORT || 6379, | |
redisHost = process.env.REDIS_HOST || '127.0.0.1', | |
redisAuth = process.env.REDIS_AUTH || null, | |
redis = require('redis'); | |
// Since we are waiting for the error event, we don't have to check for errors | |
// individually after each Redis command. | |
var onError = function (error) { |
This file contains hidden or 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 hidden or 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 hidden or 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 fs = require('fs'); | |
var words = fs.readFileSync('/usr/share/dict/words', { | |
encoding: 'utf8' | |
}).split('\n'); | |
var tlds = ['co', 'com', 'io', 'de', 'it']; | |
var results = []; |
This file contains hidden or 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 hidden or 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 bencode = require('bencode'), | |
dgram = require('dgram'), | |
hat = require('hat'), | |
_ = require('lodash'); | |
// Put in a function. The returned function won't ever throw an error. This is | |
// quite useful for malformed messages. | |
var makeSafe = function (fn, onFuckedUp) { | |
return function () { | |
try { |