Ruby Tips: Difference between revisions

From EggeWiki
No edit summary
No edit summary
Line 1: Line 1:
== [[Ruby Yaml to Enum]] ==
Generate Java 1.5 enums from a YAML file
== [[Ruby detab]] ==
== [[Ruby detab]] ==
  A script for removing tabs from source files
 
A script for removing tabs from source files


== [[Ruby Sybase Solaris]] ==
== [[Ruby Sybase Solaris]] ==

Revision as of 21:24, 21 May 2007

Ruby Yaml to Enum

Generate Java 1.5 enums from a YAML file

Ruby detab

A script for removing tabs from source files

Ruby Sybase Solaris

Error Messages

irb

Setup tab completion and history here: http://wiki.rubygarden.org/Ruby/page/show/Irb/TipsAndTricks

Ruby Sybase Install

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!(/>/, ">"); '
&lt;a href=&quot;foo&quot;&gt;