Skip to content

Instantly share code, notes, and snippets.

View rufo's full-sized avatar

Rufo Sanchez rufo

  • Minneapolis, MN
View GitHub Profile
#from expojunkie
#user nobody;
worker_processes 4;
worker_rlimit_nofile 8192;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
>> Time.parse("3/30/2010 3:30PM").to_s(:event)
=> "Tuesday, March 30th @ 03:30 PM"
>> Time.parse("3/25/2010 3:30PM").to_s(:event)
=> "Thursday @ 03:30 PM"
rufo-mbp (git)-[production]-% sudo gem install whenever ~/Dropbox/Projects/Merlin/s74-merlin @ 11:54
Password:
========================================================================
Thanks for installing Gemcutter! You can now run:
gem push merged into RubyGems 1.3.6
gem owner merged into RubyGems 1.3.6
gem webhook register urls to be pinged when gems are pushed
@rufo
rufo / Rakefile
Created February 5, 2010 19:47
This is a template prototyping app in Sinatra. Dirt simple, but hey.
require 'haml'
require 'compass'
build_ns = namespace :build do
task :haml do
Dir["views/*.haml"].each do |haml_filename|
puts "Processing #{haml_filename}..."
haml = IO.read(haml_filename)
# memory limits for ImageMagick
ENV["MAGICK_AREA_LIMIT"] = '64mb'
ENV["MAGICK_MAP_LIMIT"] = '32mb'
ENV["MAGICK_MEMORY_LIMIT"] = '32mb'
# this is dependent on the yaml_db plugin at http://github.com/adamwiggins/yaml_db/tree/master
# also, you may not need the RAILS_ENV bit - we do multi-stage deployments
namespace :data do
desc "Updates staging server database with contents of local development"
task :update_server, :roles => :db do
system "rake db:data:dump"
upload "db/data.yml", "#{current_release}/db/data.yml"
run "cd #{current_release}; RAILS_ENV=#{rails_env} rake db:data:load"
end