This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| BLACK => "\033[30m", | |
| RED => "\033[31m", | |
| GREEN => "\033[32m", | |
| YELLOW => "\033[33m", | |
| BLUE => "\033[34m", | |
| PURPLE => "\033[35m", | |
| CYAN => "\033[36m", | |
| WHITE => "\033[37m", | |
| # background color |
| /* | |
| * Copyright (c) 2011 Berk D. Demir <bdd@mindcast.org> | |
| * | |
| * Permission to use, copy, modify, and distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above | |
| * copyright notice and this permission notice appear in all copies. | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| /** | |
| * First, better, "set exports/return" option | |
| */ | |
| (function (define) { | |
| //The 'id' is optional, but recommended if this is | |
| //a popular web library that is used mostly in | |
| //non-AMD/Node environments. However, if want | |
| //to make an anonymous module, remove the 'id' | |
| //below, and remove the id use in the define shim. | |
| define('id', function (require) { |
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
| #!/usr/bin/env bash | |
| # Use this one-liner to produce a JSON literal from the Git log: | |
| git log \ | |
| --pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
| $@ | \ | |
| perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
| perl -pe 's/},]/}]/' |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| if ($request_uri = /) { | |
| set $test A; | |
| } | |
| if ($host ~* teambox.com) { | |
| set $test "${test}B"; | |
| } | |
| if ($http_cookie !~* "auth_token") { | |
| set $test "${test}C"; |
| #!/bin/sh | |
| # Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
| set -e | |
| # Must be a valid filename | |
| NAME=foo | |
| PIDFILE=/var/run/$NAME.pid | |
| #This is the command to be run, give the full pathname | |
| DAEMON=/usr/local/bin/bar |