Skip to content

Instantly share code, notes, and snippets.

@brookr
Created June 2, 2009 18:43
Show Gist options
  • Select an option

  • Save brookr/122490 to your computer and use it in GitHub Desktop.

Select an option

Save brookr/122490 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'utility_belt'
require 'wirble'
class Object
def local_methods
(methods - Object.instance_methods).sort
end
end
def with_sql
bkup = ActiveRecord::Base.logger
ActiveRecord::Base.logger = Logger.new(STDOUT)
yield
ActiveRecord::Base.logger = bkup
end
class Object
def console_reminder
puts "You're not in Terminal. CMD-} until you're out of the console."
end
%w{pwd cd l rake}.each do |cmd|
eval "alias #{cmd} console_reminder"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment