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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
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.exports = { | |
'rules': { | |
'indent': [ | |
2, | |
2 | |
], | |
'quotes': [ | |
2, | |
'single' | |
], |
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
'use strict'; | |
module.exports.jsonResponseObject = function jsonResponseObject(err, data) { | |
return { | |
meta: { | |
status: err ? (err.status || 500) : 200, | |
message: err ? (err.message || 'Error') : 'OK' | |
}, | |
response: data || {} | |
}; |
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
'use strict'; | |
const _ = require('underscore'); | |
function Task(fn) { | |
this.fn = fn; | |
} | |
function Worker(interval, tasks) { | |
this.interval = interval; |
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
["red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey"] |
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
#!/bin/bash | |
# Set $skeleton to desired path and rename the file to e.g. closet.sh | |
# Set $path to desired target directory to raise the skeleton | |
# Usage: closet project-name | |
name=$1 | |
path=~/repos/$name | |
skeleton=~/repos/sshow-node-module-skeleton | |
if [ "$1" == "--current" ]; then |
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
#!/usr/bin/env bash | |
echo "Who this :) <21" | |
if [ "$1" = "" ]; then | |
echo "Missing arg" | |
exit 1 | |
fi | |
filepath=$(which $1 2> /dev/null) |
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
const SECOND = 1000 | |
const MINUTE = SECOND * 60 | |
const HOUR = MINUTE * 60 | |
const DAY = HOUR * 24 | |
function timeAgo (date) { | |
const delta = Date.now() - parseInt(date) | |
const ago = { | |
day: delta / DAY, | |
hour: delta / HOUR, |
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
#!/bin/bash | |
# Get zero-padded hex string from date format | |
# Usage: f <format> | |
function f { | |
printf %02X $(date +$1) | |
} | |
h=$(f %-H) | |
m=$(f %-M) |
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
#!/bin/bash | |
# made for tghack '17 | |
# desc: upload a file chunked through a shell with length | |
# restrictions of commands. you might need to manually | |
# tune the BUFLEN to stay within the limits. sh syntax | |
# errors appears when you're out of bounds. | |
# | |
# todo: progress bar | |
# | |
HOST=${1} |
OlderNewer