Created
June 1, 2012 16:07
-
-
Save saveologypaul/2853223 to your computer and use it in GitHub Desktop.
Wirble and irbrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 | |
# 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