Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3643
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3643
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3651
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3651
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3654
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3654
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 1925
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 1925
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 2290
Warning: implode() [function.implode]: Argument must be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3242
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3265
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3265
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3306
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3357
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3357
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3502
Warning: Invalid argument supplied for foreach() in /home/aetheric/public_html/blender/wp-content/plugins/devformatter/geshi/geshi.php on line 3502
Here’s my (current) .irbrc, with comments
| | | copy code | | ? |
| 01 | |
| 02 | # I am including gems in my irb session. Therefore, the next require |
| 03 | require 'rubygems' |
| 04 | |
| 05 | # wirble is a wonderful gem which add nice features to irb |
| 06 | require 'wirble' |
| 07 | |
| 08 | # Dr. Nic's useful helper gem. It makes it so you can say: |
| 09 | # foo.map_by_bar |
| 10 | # instead of having to say: |
| 11 | # foo.map{|f| f.bar} |
| 12 | # more to the point you can do |
| 13 | # people.map_by_first_and_last |
| 14 | # instead of |
| 15 | # people.map{|p| [p.first, p.last]} |
| 16 | require 'map_by_method' |
| 17 | |
| 18 | # what_methods is a way to see which methods, when performed on an object, return a particular value: |
| 19 | # >> "hi".what? 'h' |
| 20 | # "hi".chop! == "h" |
| 21 | # "hi".chop == "h" |
| 22 | # => ["chop!", "chop"] |
| 23 | require 'what_methods' |
| 24 | |
| 25 | # pretty print --> provides a "pretty" view of an object |
| 26 | require 'pp' |
| 27 | |
| 28 | # auto indent irb; it's useful for when you're just experimenting |
| 29 | IRB.conf[:AUTO_INDENT]=true |
| 30 | |
| 31 | # start wirble (with color) |
| 32 | Wirble.init |
| 33 | #Wirble.colorize |
| 34 | |
| 35 | # What are the methods which belong only to an object, and not those inherited from Object |
| 36 | class Object |
| 37 | def my_methods |
| 38 | (self.methods - Object.methods).sort |
| 39 | end |
| 40 | end |
| 41 | |
| 42 | # strip html tags from a string |
| 43 | class String |
| 44 | def strip_tags |
| 45 | self.gsub(/<\S[^><]*>/,"") |
| 46 | end |
| 47 | end |
I’ve shown mine. Show me yours?
Here are links to the referenced rubygems:

