This file contains 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
# 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 |
This file contains 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
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 |