<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/ruby</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 21 Aug 2008 19:34:07 GMT</pubDate>
<item>
<title>(Ruby) Covert Pixels to Centimeters - marouanomezzine</title>
<link>http://snipplr.com/view/7920/covert-pixels-to-centimeters/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 19 Aug 2008 06:37:57 GMT</pubDate>
<guid>http://snipplr.com/view/7920/covert-pixels-to-centimeters/</guid>
</item>
<item>
<title>(PHP) PHP - Lightweight Database and Rowset class, ActiveRecord style functions - dom111</title>
<link>http://snipplr.com/view/7468/php--lightweight-database-and-rowset-class-activerecord-style-functions/</link>
<description><![CDATA[ <p>Been wanting to made one of these for a while and finally I got round to it.

For some examples please visit the post:
http://www.dom111.co.uk/blog/coding/db/8

Any comments suggestions appreciated.
CreativeCommons ShareAlike</p> ]]></description>
<pubDate>Wed, 23 Jul 2008 18:59:13 GMT</pubDate>
<guid>http://snipplr.com/view/7468/php--lightweight-database-and-rowset-class-activerecord-style-functions/</guid>
</item>
<item>
<title>(Ruby) Charles Roper's custom .irbrc for Windows - charlesroper</title>
<link>http://snipplr.com/view/7379/charles-ropers-custom-irbrc-for-windows/</link>
<description><![CDATA[ <p>1. Make sure the following environment variable is set:

  WinXP:
  HOME=C:\Documents and Settings\*username*

  Vista:
  HOME=C:\Users\*username*

2. Create an .irbrc file in %HOME%:
  
  $ cd %HOME%
  $ touch .irbrc

If you don't have touch installed, use a good text editor to save the .irbrc. E Text Editor is good, as is Notepad++.

3. Install the following gems:

fastri
[http://eigenclass.org/hiki.rb?cmd=view&amp;p=fastri&amp;key=fastri]

map_by_method and what_methods
[http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/]

wirble
[http://pablotron.org/software/wirble/]

win32console
http://rubyforge.org/projects/winconsole/</p> ]]></description>
<pubDate>Fri, 18 Jul 2008 11:59:50 GMT</pubDate>
<guid>http://snipplr.com/view/7379/charles-ropers-custom-irbrc-for-windows/</guid>
</item>
<item>
<title>(Other) Compile all css files in a rails project - vanne</title>
<link>http://snipplr.com/view/7369/compile-all-css-files-in-a-rails-project/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 17 Jul 2008 17:36:28 GMT</pubDate>
<guid>http://snipplr.com/view/7369/compile-all-css-files-in-a-rails-project/</guid>
</item>
<item>
<title>(Other) port install ruby -> malloc error - cczona</title>
<link>http://snipplr.com/view/7208/port-install-ruby--malloc-error/</link>
<description><![CDATA[ <p>'port install ruby' sometimes results in malloc errors near the final phase (just after destroot completes).  It appears that macports may be out of memory while installing documentation.</p> ]]></description>
<pubDate>Thu, 10 Jul 2008 04:35:47 GMT</pubDate>
<guid>http://snipplr.com/view/7208/port-install-ruby--malloc-error/</guid>
</item>
<item>
<title>(Bash) Install mySQL gem on a fink (vs self made) mySQL installation - iblis</title>
<link>http://snipplr.com/view/7183/install-mysql-gem-on-a-fink-vs-self-made-mysql-installation/</link>
<description><![CDATA[ <p>When installing mysql and mysql-dev with fink, gem is unable to find the mysql headers and libraries: you should specify their location. If compiled manually from source, gem will find it if /usr/local/mysql (or what ever other location you specified at compilation time) is in your path.</p> ]]></description>
<pubDate>Wed, 09 Jul 2008 10:51:20 GMT</pubDate>
<guid>http://snipplr.com/view/7183/install-mysql-gem-on-a-fink-vs-self-made-mysql-installation/</guid>
</item>
<item>
<title>(Ruby) Match Single-line Javascript Comments - mikegreen</title>
<link>http://snipplr.com/view/7130/match-singleline-javascript-comments/</link>
<description><![CDATA[ <p>Matches single line Javascript (and PHP, etc.) comments</p> ]]></description>
<pubDate>Sat, 05 Jul 2008 00:37:26 GMT</pubDate>
<guid>http://snipplr.com/view/7130/match-singleline-javascript-comments/</guid>
</item>
<item>
<title>(Regular Expression) Match CSS and JS Comments - mikegreen</title>
<link>http://snipplr.com/view/7129/match-css-and-js-comments/</link>
<description><![CDATA[ <p>Matches CSS-style comments spanning one or multiple lines</p> ]]></description>
<pubDate>Sat, 05 Jul 2008 00:32:30 GMT</pubDate>
<guid>http://snipplr.com/view/7129/match-css-and-js-comments/</guid>
</item>
<item>
<title>(Ruby) Rough Vitalist to Rememberthemilk conversion - berkes</title>
<link>http://snipplr.com/view/7104/rough-vitalist-to-rememberthemilk-conversion/</link>
<description><![CDATA[ <p>Hacked up Ruby script that downloads all the tasks from vitalist and mails them as new tasks to rememberthemilk. 

NOTE: you need to change some values in the source to make this work. You also need to comment and uncomment some parts if  you want to store stuff locally first, or use this as a one-time script.</p> ]]></description>
<pubDate>Thu, 03 Jul 2008 15:28:27 GMT</pubDate>
<guid>http://snipplr.com/view/7104/rough-vitalist-to-rememberthemilk-conversion/</guid>
</item>
<item>
<title>(Rails) Render file (no html) - tonic</title>
<link>http://snipplr.com/view/7098/render-file-no-html/</link>
<description><![CDATA[ <p>Send file from different name</p> ]]></description>
<pubDate>Thu, 03 Jul 2008 07:20:26 GMT</pubDate>
<guid>http://snipplr.com/view/7098/render-file-no-html/</guid>
</item>
<item>
<title>(Ruby) try - mdi</title>
<link>http://snipplr.com/view/6901/try/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 25 Jun 2008 09:40:34 GMT</pubDate>
<guid>http://snipplr.com/view/6901/try/</guid>
</item>
<item>
<title>(Ruby) Url.image - mdi</title>
<link>http://snipplr.com/view/6900/urlimage/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 25 Jun 2008 09:40:12 GMT</pubDate>
<guid>http://snipplr.com/view/6900/urlimage/</guid>
</item>
<item>
<title>(Ruby) generate password - mdi</title>
<link>http://snipplr.com/view/6898/generate-password/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 25 Jun 2008 09:39:01 GMT</pubDate>
<guid>http://snipplr.com/view/6898/generate-password/</guid>
</item>
<item>
<title>(Ruby) Simple mocking of Ruby objects - narkisr</title>
<link>http://snipplr.com/view/6842/simple-mocking-of-ruby-objects/</link>
<description><![CDATA[ <p>This is as simple as it gets, basiclly this templates shows you how to mock an object methods to any other piece of code that you like (open objects at its simplest glory).</p> ]]></description>
<pubDate>Sun, 22 Jun 2008 18:38:12 GMT</pubDate>
<guid>http://snipplr.com/view/6842/simple-mocking-of-ruby-objects/</guid>
</item>
<item>
<title>(Ruby) Mixing in a Module immediately after an objects Singleton class - chrisaiv</title>
<link>http://snipplr.com/view/6821/mixing-in-a-module-immediately-after-an-objects-singleton-class/</link>
<description><![CDATA[ <p>There are two ways to insert a module above the objects singleton class but before the objects Class</p> ]]></description>
<pubDate>Fri, 20 Jun 2008 19:58:38 GMT</pubDate>
<guid>http://snipplr.com/view/6821/mixing-in-a-module-immediately-after-an-objects-singleton-class/</guid>
</item>
<item>
<title>(Ruby) String split by line - tonic</title>
<link>http://snipplr.com/view/6810/string-split-by-line/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 20 Jun 2008 09:04:19 GMT</pubDate>
<guid>http://snipplr.com/view/6810/string-split-by-line/</guid>
</item>
<item>
<title>(Ruby) Función básica para eliminiar acentos en minúsculas - tonic</title>
<link>http://snipplr.com/view/6808/funcin-bsica-para-eliminiar-acentos-en-minsculas/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 20 Jun 2008 05:55:22 GMT</pubDate>
<guid>http://snipplr.com/view/6808/funcin-bsica-para-eliminiar-acentos-en-minsculas/</guid>
</item>
<item>
<title>(Ruby) REXML Language Identification monkey patch - tommorris</title>
<link>http://snipplr.com/view/6744/rexml-language-identification-monkey-patch/</link>
<description><![CDATA[ <p>REXML does not seem to have a 'lang' method, which is strange since lang is in the XML 1.0 Specification §2.12 'Language Identification', and in many other libraries. Because of Ruby's 'monkey patching', it's pretty easy to add - you just recursively browse the ancestors. Alas, because attributes are stored internally as strings and not an Attribute object, there does not seem to be any way of monkey patching §2.12 support on to REXML's attribute handling.

One day, Ruby will have a really good XML parser - speedy as a SAX and fully DOMinanting over the vagaries of namespaces etc.

Enclosed is an RSpec test that demonstrates usage.</p> ]]></description>
<pubDate>Mon, 16 Jun 2008 21:30:16 GMT</pubDate>
<guid>http://snipplr.com/view/6744/rexml-language-identification-monkey-patch/</guid>
</item>
<item>
<title>(Ruby) TextMate bundle searching and pasting code - banzaiman</title>
<link>http://snipplr.com/view/6603/textmate-bundle-searching-and-pasting-code/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 05 Jun 2008 15:03:04 GMT</pubDate>
<guid>http://snipplr.com/view/6603/textmate-bundle-searching-and-pasting-code/</guid>
</item>
<item>
<title>(Ruby) TextMate bundle posting code - banzaiman</title>
<link>http://snipplr.com/view/6602/textmate-bundle-posting-code/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 05 Jun 2008 14:59:09 GMT</pubDate>
<guid>http://snipplr.com/view/6602/textmate-bundle-posting-code/</guid>
</item>
</channel>
</rss>