Skip to content

Instantly share code, notes, and snippets.

@rajib
rajib / workers.rake
Created September 1, 2012 04:55 — forked from karmi/workers.rake
Rake taks to launch multiple Resque workers in development/production with simple management included
# Rake task to launch multiple Resque workers in development/production with simple management included
require 'resque/tasks' # Require Resque tasks
namespace :workers do
# = $ rake workers:start
#
# Launch multiple Resque workers with the Rails environment loaded,
# so they have access to your models, etc.
@rajib
rajib / Evolution of a Ruby Programmer.rb
Created February 18, 2010 07:07 — forked from bernerdschaefer/Evolution of a Ruby Programmer.rb
Evolution of a Ruby Programmer.rb
# Newbie Programmer
def factorial(x)
if x == 0
return 1
else
return x * factorial(x - 1)
end
end
puts factorial(6)
puts factorial(0)