Public Gists by zachhale

Gravatar
Tue Nov 03 12:10:18 -0800 2009
1
2
3
class Hash
  def requires!(*args)
    args.flatten.each do |arg|
Gravatar
Thu Oct 15 17:43:39 -0700 2009
1
2
3
task :generate_static_pages => :environment do
  ActionController::Dispatcher.define_dispatcher_callbacks(true) # same as config.cache_classes = true
  
Gravatar
Tue Jul 28 11:12:48 -0700 2009
1
2
3
# requires rails environment to be loaded
include ActionView::Helpers::UrlHelper
include ActionController::UrlWriter
Gravatar
Tue Jul 21 09:07:31 -0700 2009
1
alias ss="/rails/.shortcuts/ss.rb"
Gravatar
Thu Jul 16 16:23:33 -0700 2009
1
2
3
#!/usr/bin/env ruby
require 'rubygems'
require 'daemon-spawn'
Gravatar
Fri Jun 19 00:55:10 -0700 2009
1
2
3
# we have
admin.resources :meals do |meal|
  meal.resources :preparation_steps
Gravatar
Fri Mar 06 13:09:59 -0800 2009
1
2
3
>> o = Object.new
=> #<Object:0x815c45c>
>> o.class
Gravatar
Thu Jan 29 16:55:08 -0800 2009
1
2
3
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
 
gist: 47217 Colored, w/out username
Gravatar
Wed Jan 14 17:49:35 -0800 2009
1
2
3
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
Gravatar
Mon Nov 10 12:13:21 -0800 2008
1
2
3
# cell widths
cell_widths = [160,60]