Skip to content

Instantly share code, notes, and snippets.

💭
Making stuff.

Tom Preston-Werner mojombo

💭
Making stuff.
View GitHub Profile
View config
$ git config --global user.name "Tom Preston-Werner"
$ git config --global user.email "tom@mojombo.com"
$ git config --global color.ui true
View README
Another mustache.erl example, this time showing off lists and asking for context in one of the view functions.
View README
Just a simple demonstration of how to use my soon-to-be-released mustache.erl library. Mustaches forever!
View decoder_benchmarks.rb
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rubygems'
require 'bert'
require 'json'
require 'yajl'
require 'benchmark'
ITER = 1_000
View bertmark.rb
require 'rubygems'
require 'bert'
require 'json'
require 'yajl'
require 'benchmark'
ITER = 1_000
tiny = t[:ok, :awesome]
small = t[:ok, :answers, [42] * 42]
View autobench_grapher.rb
# Used to graph results from autobench
#
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv
#
# This will generate three svg & png graphs
require "rubygems"
require "scruffy"
require 'csv'
require 'yaml'
View gist:201623
Failed on server connect attempt 1. Trying again...
Uncaught exception
recieved ConnectionUnbound for an unknown signature: f6f17803599e03b44307e9cbe741a2284
/Users/tom/.rip/active/lib/eventmachine.rb:1485:in `event_callback'
/Users/tom/.rip/active/lib/eventmachine.rb:245:in `release_machine'
/Users/tom/.rip/active/lib/eventmachine.rb:245:in `run'
./bin/../lib/proxymachine.rb:70:in `run'
bin/proxymachine:36
View gist:199473
== Signal handling
In general, signals need only be sent to the master process. However,
the signals Unicorn uses internally to communicate with the worker
processes are documented here as well.
=== Master Process
* HUP - reload config file, app, and gracefully restart all workers
You can’t perform that action at this time.