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"; | |
if (typeof DEV == 'undefined') return; | |
function assert(condition, message){ | |
if (!condition) throw new Error(message || "Assertion fault"); | |
} | |
exports.assert = assert; |
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
node_modules/ |
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
//arian@arian-sys:~/www/wrapup (master) $ ./node_modules/.bin/uglifyjs test.js --compress --mangle --define ES5=false | |
//WARN: Condition always true [test.js:6,34] | |
//WARN: Dropping unreachable code [test.js:9,2] | |
function foo(){console.log("es5")} |
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
@-webkit-keyframes rotate { | |
0% {-webkit-transform: rotate(0deg);} | |
100% {-webkit-transform: rotate(360deg);} | |
} | |
.rotation { | |
-webkit-animation: rotate; | |
-webkit-animation-duration: 1s; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-timing-function: linear; |
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
for (expr1; expr2; expr3) { | |
// do thing | |
} | |
expr1 | |
while (expr2) { | |
// do thing | |
expr3 | |
} |
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
# based on http://geeknme.wordpress.com/2009/10/15/getting-started-with-upstart-in-ubuntu/ | |
description "start and stop the nodejs server" | |
version "1.0" | |
author "Arian Stolwijk" | |
# tell upstart we're creating a daemon | |
# upstart manages PID creation for you. | |
expect fork | |
script |
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
# add ~/bin to path | |
PATH=$PATH:/home/arian/bin | |
# use all 256 colors | |
if [ -n "$DISPLAY" -a "$TERM" == "xterm" ]; then | |
export TERM=xterm-256color | |
fi | |
function git_prompt { | |
local STATUS=`git status 2>&1` |
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 slice = Function.prototype.call.bind(Array.prototype.slice); | |
var forEach = Function.prototype.call.bind(Array.prototype.forEach); | |
var Event = function(event){ | |
this.event = event || window.event; | |
this.locals = {}; | |
}; | |
Event.prototype.target = function(){ |
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
./node_modules/.bin/jade --no-debug --client --out ./public/templates ./views/partials/* | |
sed -i 's/^function anonymous/require("jade\/runtime");module.exports = function/' ./public/templates/* |
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 spawn = require('child_process').spawn; | |
var Stream = require('stream'); | |
/** | |
* crops and resizes images to our desired size | |
* @param {Stream} streamIn in stream containing the raw image | |
* @return {Stream} | |
*/ | |
exports.cropImage = function(streamIn){ |