Skip to content

Instantly share code, notes, and snippets.

View timruffles's full-sized avatar

Tim Ruffles timruffles

View GitHub Profile
@threetee
threetee / unicorn_wrapper.sh
Created January 20, 2012 19:52
Wrapper to allow runit to send signals to the unicorn master even when its PID changes
#!/bin/sh
set -e
APP=$1
APP_PATH="/srv/${APP}/current"
RAILS_ENV=$2
UNICORN_CONFIG="/etc/unicorn/${APP}.rb"
UNICORN_PID_FILE="/tmp/unicorn.${APP}.pid"
@tvcutsem
tvcutsem / deferredtest.html
Created June 22, 2011 18:08
Deferred functions in Javascript using Generators
<!DOCTYPE html>
<html>
<head>
<!-- using Kris Kowal's Q library, based on CommonJS Promises/B
https://github.com/kriskowal/q
http://wiki.commonjs.org/wiki/Promises/B
Code based on ideas by Mark S. Miller and Dave Herman. The animation example
was taken from <http://wiki.ecmascript.org/doku.php?id=strawman:deferred_functions>
-->