Skip to content

Instantly share code, notes, and snippets.

View rufo's full-sized avatar

Rufo Sanchez rufo

  • Minneapolis, MN
View GitHub Profile
# 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
# memory limits for ImageMagick
ENV["MAGICK_AREA_LIMIT"] = '64mb'
ENV["MAGICK_MAP_LIMIT"] = '32mb'
ENV["MAGICK_MEMORY_LIMIT"] = '32mb'
@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)
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
>> 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"
#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;
@rufo
rufo / .zshrc
Created November 17, 2010 22:20
export PATH="/opt/android-sdk/tools:/opt/android-sdk/platforms/android-1.5/tools:/usr/local/libexec/git-core:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:$PATH"
export MANPATH="/usr/local/man:/usr/local/mysql/man:$MANPATH"
export EDITOR="mate -w"
export CLICOLOR=true
export MENU_COMPLETE=false
export CDPATH=.:~/Dropbox/Projects:~/Projects:~/Dropbox/sandbox
export ARCHFLAGS="-arch x86_64"
HISTSIZE=1000
SAVEHIST=1000
@rufo
rufo / initializer.rb
Created May 11, 2011 19:41
SWFUpload Rails 2.3 server side code
ActionController::Dispatcher.middleware.insert_before(ActionController::Base.session_store, FlashSessionCookieMiddleware, ActionController::Base.session_options[:session_key])
@rufo
rufo / lcd.rb
Created May 20, 2011 00:53
Rochester.rb LCD Number Solution
#!/usr/bin/env ruby
@numbers = [
["-", "|", "|", " ", "|", "|", "-"],
[" ", " ", "|", " ", " ", "|", " "],
["-", " ", "|", "-", "|", " ", "-"],
["-", " ", "|", "-", " ", "|", "-"],
[" ", "|", "|", "-", " ", "|", " "],
["-", "|", " ", "-", " ", "|", "-"],
["-", "|", " ", "-", "|", "|", "-"],
@rufo
rufo / .vimrc
Created January 4, 2012 20:23
vim setup
" with inspiration from http://stevelosh.com/blog/2010/09/coming-home-to-vim/
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
filetype plugin indent on
set nocompatible
set tabstop=2