Ruby Tips
Appearance
Generate Java 1.5 enums from a YAML file
A script for removing tabs from source files
Error Messages
irb
Setup tab completion and history here: http://wiki.rubygarden.org/Ruby/page/show/Irb/TipsAndTricks
Escape invalid XML characters.
This is useful for running stuff through before posting it to the wiki.
echo "<a href=\"foo\">" | ruby -pe 'gsub!(/\&/, "&"); gsub!(/"/, """); gsub!(/</, "<"); gsub!(/>/, ">"); ' <a href="foo">