Skip to content

Instantly share code, notes, and snippets.

@kyledrake
kyledrake / gist:2120107
Created March 19, 2012 17:24
Rainbows! config file for use with EventMachine
# This is a configuration script for using Rainbows with EventMachine. I'm providing it incase somebody finds it useful. But honestly, you
# should stop using EventMachine and use threads instead. The ThreadPool version of this is also in my gist list, and I recommend taking a look at that instead.
# NO, SERIOUSLY, STOP USING EVENTMACHINE.
Rainbows! do
name = 'yourappname'
use :EventMachine
client_max_body_size nil # This is set in nginx
# keepalive_timeout 1
@ono
ono / bday.irb
Created February 3, 2011 08:32
Kosuke's first program. "Dad, how many days until my birthday?"
kaz:~ kazueono$ irb
>> bday = Time.local 2011,3,19
=> Sat Mar 19 00:00:00 +0000 2011
>> bday.yday
=> 78
>> Time.now
=> Thu Feb 03 08:19:58 +0000 2011
>> Time.now.yday
=> 34
>> bday.yday - Time.now.yday