This file contains hidden or 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
# unicorn | |
description "unicorn ruby app server" | |
start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345]) | |
stop on runlevel [!2345] | |
env WORKDIR=/data | |
env PIDFILE=/data/tmp/pids/unicorn.pid | |
env CFGFILE=/data/config/unicorn.rb |
This file contains hidden or 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
group :test do | |
gem 'capybara' | |
gem 'poltergeist' # gem 'capybara-webkit' | |
gem 'database_cleaner' | |
end |
This file contains hidden or 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
# Compile CityHash | |
#g++ -shared city.cc -o libcity.dylib | |
# | |
# Figure out the symbol names.. this doesn't look right. Probably user error. | |
# nm -g libcity.dylib | |
# | |
=begin | |
0000000000000db7 T __Z10CityHash64PKcm | |
0000000000001800 T __Z11CityHash128PKcm |
This file contains hidden or 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 python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
This file contains hidden or 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
class ActiveRecordBase extends Backbone.Model | |
url: "/" | |
fields: [] | |
toJSON: () -> | |
@attributes.authenticity_token = @token() | |
return _.clone(@attributes) | |
fill: (selector) -> | |
form = jQuery(selector) |