Skip to content

Instantly share code, notes, and snippets.

@saveologypaul
Created June 1, 2012 16:07
Show Gist options
  • Save saveologypaul/2853223 to your computer and use it in GitHub Desktop.
Save saveologypaul/2853223 to your computer and use it in GitHub Desktop.
Wirble and irbrc
## Required
# install
sudo gem install wirble
sudo gem install utility_belt
# settings for ~/.irbrc
require 'rubygems'
require 'utility_belt'
UtilityBelt::Themes.background(:dark) #optional
## Now you can play in irb
# Interactively edit IRB code in TextMate
mate
# read from clipboard
MacClipboard.read
# write to clipboard
MacClipboard.write 'some text to be pasted elsewhere'
# review history
h # 'history' also works, but who wants to type?
# re-play last command
h!
# re-play arbitrary command from history
h! 123
# save history to some file
history_write('/path/to/file')
# find class name
grep_classes("num")
#=> ["Bignum", "Fixnum", "Numeric", "REXML::SyncEnumerator"]
# find method name
"foo".grep_methods("pretty")
#=> ["pretty_inspect", "pretty_print_instance_variables", ... ]
# google for whatever's in clipboard
google
# arbitrary google search
google singleWord
google 'multiple words'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment