<?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/favorites/vali29/language/ruby</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 23 Nov 2008 06:15:16 GMT</pubDate>
<item>
<title>(Ruby) Super Simple Speller v2 - vali29</title>
<link>http://snipplr.com/view/2709/super-simple-speller-v2/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 24 May 2007 13:19:04 GMT</pubDate>
<guid>http://snipplr.com/view/2709/super-simple-speller-v2/</guid>
</item>
<item>
<title>(Ruby) Check for new twitters in e/TextMate - vali29</title>
<link>http://snipplr.com/view/2361/check-for-new-twitters-in-etextmate/</link>
<description><![CDATA[ <p>Requires the twitter bundle.  This is an early attempt at updating this.  Pretty crude at the moment, but it works.</p> ]]></description>
<pubDate>Tue, 20 Mar 2007 01:11:53 GMT</pubDate>
<guid>http://snipplr.com/view/2361/check-for-new-twitters-in-etextmate/</guid>
</item>
<item>
<title>(Ruby) Post to Twitter from e/TextMate - vali29</title>
<link>http://snipplr.com/view/2351/post-to-twitter-from-etextmate/</link>
<description><![CDATA[ <p>Adapted from http://journal.mychores.co.uk/articles/2007/01/21/updating-twitter-from-ruby-rails</p> ]]></description>
<pubDate>Sun, 18 Mar 2007 10:39:00 GMT</pubDate>
<guid>http://snipplr.com/view/2351/post-to-twitter-from-etextmate/</guid>
</item>
<item>
<title>(Ruby) Check for e updates - vali29</title>
<link>http://snipplr.com/view/2292/check-for-e-updates/</link>
<description><![CDATA[ <p>Requires wget and curl.</p> ]]></description>
<pubDate>Fri, 09 Mar 2007 12:02:28 GMT</pubDate>
<guid>http://snipplr.com/view/2292/check-for-e-updates/</guid>
</item>
<item>
<title>(Ruby) Ruby env shebang with warnings - vali29</title>
<link>http://snipplr.com/view/2169/ruby-env-shebang-with-warnings/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 13 Feb 2007 09:45:28 GMT</pubDate>
<guid>http://snipplr.com/view/2169/ruby-env-shebang-with-warnings/</guid>
</item>
<item>
<title>(Ruby) ActionMailer - vali29</title>
<link>http://snipplr.com/view/2148/actionmailer/</link>
<description><![CDATA[ <p>Sick of writing almost the same thing over and over in your ActionMailer classes? Skip all that, and use something like this.


(If you have a configuration loaded into a constant, you could just replace the defaults above and use your app's defaults to make it all cleaner, of course)

And then from your controller you can do stuff like this:</p> ]]></description>
<pubDate>Thu, 08 Feb 2007 13:00:34 GMT</pubDate>
<guid>http://snipplr.com/view/2148/actionmailer/</guid>
</item>
<item>
<title>(Ruby) Strip HTML Tags - vali29</title>
<link>http://snipplr.com/view/2097/strip-html-tags/</link>
<description><![CDATA[ <p>This replaces the PHP-based function in the HTML bundle.  You need to add two files to your bundle's Support/lib folder (create the directories if they're not present):

http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb?format=raw
http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb?format=raw</p> ]]></description>
<pubDate>Fri, 02 Feb 2007 15:28:37 GMT</pubDate>
<guid>http://snipplr.com/view/2097/strip-html-tags/</guid>
</item>
<item>
<title>(Ruby) Preview in IE - vali29</title>
<link>http://snipplr.com/view/2081/preview-in-ie/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 01 Feb 2007 13:49:25 GMT</pubDate>
<guid>http://snipplr.com/view/2081/preview-in-ie/</guid>
</item>
<item>
<title>(Ruby) Remote Form Tag - vali29</title>
<link>http://snipplr.com/view/2054/remote-form-tag/</link>
<description><![CDATA[ <p>An example ajax form tag</p> ]]></description>
<pubDate>Thu, 01 Feb 2007 00:44:04 GMT</pubDate>
<guid>http://snipplr.com/view/2054/remote-form-tag/</guid>
</item>
<item>
<title>(Ruby) Post snippet to Snipplr - vali29</title>
<link>http://snipplr.com/view/2044/post-snippet-to-snipplr/</link>
<description><![CDATA[ <p>Alternative bundle command for e (http://www.e-texteditor.com) or TextMate.

Replace YOUR_API_KEY_HERE with a valid API key -- you can find it on your Settings page (http://snipplr.com/settings/).

Changed the command to allow selection of language.  (Thanks, Tyler!)  Also it was unnecessary to escape entities when posting to Snipplr, so that caused problems.  Please let me know if you have any issues with or suggestions for this command.  If you're using TextMate, you'll need to alter the path to CocoaDialog, and you might as well use an environment variable for the API Key.

2/2/2007: Fixed a bug that prevented posting snippets with no tags.  Languages are now sorted alphabetically.</p> ]]></description>
<pubDate>Tue, 30 Jan 2007 20:26:49 GMT</pubDate>
<guid>http://snipplr.com/view/2044/post-snippet-to-snipplr/</guid>
</item>
<item>
<title>(Ruby) Get one of your snippets from Snipplr - vali29</title>
<link>http://snipplr.com/view/2039/get-one-of-your-snippets-from-snipplr/</link>
<description><![CDATA[ <p>This command allows you to browse your snippet collection on Snipplr and retrieve them into e.  Requires the installation of the wxCocoaDialog exe in the /Support/bin subdirectory.

Replace YOUR_API_KEY_HERE with the API key -- you can find it on your Settings page (http://snipplr.com/settings/).

Update 1/31/2007: I found escaping the $ was necessary to prevent the snippet engine from eating the variable.
Update 2/01/2007: Use the standard library function for escaping the snippet (instead of my own gsub() regex.
Update 2/02/2007: Add error checking code; handle empty accounts a bit more gracefully (and informatively).</p> ]]></description>
<pubDate>Tue, 30 Jan 2007 15:26:51 GMT</pubDate>
<guid>http://snipplr.com/view/2039/get-one-of-your-snippets-from-snipplr/</guid>
</item>
<item>
<title>(Ruby) Super Simple Speller v3 - vali29</title>
<link>http://snipplr.com/view/2037/super-simple-speller-v3/</link>
<description><![CDATA[ <p>Requires aspell and wxCocoaDialog.

Now checks all of your selection for misspellings.

Known issues: 
* e doesn't see contractions as a "word", so you must select things like can't, won't, etc. or the command won't see the whole word.

* Duplicate misspelled words are not handled well.  Replacements are done globally, yet you'll be asked for each occurrence.

Place in the Text bundle
I named the command: Spell check word/selection
Save: Nothing
Input: Selected Text or Word
Output: Replace Selected Text
Key Equivalent: Ctrl-;
Scope Selector: {Blank}</p> ]]></description>
<pubDate>Mon, 29 Jan 2007 22:27:02 GMT</pubDate>
<guid>http://snipplr.com/view/2037/super-simple-speller-v3/</guid>
</item>
<item>
<title>(Ruby) wxCocoaDialog dropdown example in Ruby - vali29</title>
<link>http://snipplr.com/view/2036/wxcocoadialog-dropdown-example-in-ruby/</link>
<description><![CDATA[ <p>This is an example of how to use the wxCocoaDialog dropdown widget from Ruby.</p> ]]></description>
<pubDate>Mon, 29 Jan 2007 20:07:16 GMT</pubDate>
<guid>http://snipplr.com/view/2036/wxcocoadialog-dropdown-example-in-ruby/</guid>
</item>
<item>
<title>(Ruby) wxCocoaDialog progressbar example - vali29</title>
<link>http://snipplr.com/view/2031/wxcocoadialog-progressbar-example/</link>
<description><![CDATA[ <p>This is an example of how to use the progressbar widget from Alexander Stigsen's new wxCocoaDialog, an open source port of CocoaDialog to Win32 using the ExWidgets toolkit.  This is a companion project to his e Text Editor.</p> ]]></description>
<pubDate>Sat, 27 Jan 2007 11:02:39 GMT</pubDate>
<guid>http://snipplr.com/view/2031/wxcocoadialog-progressbar-example/</guid>
</item>
<item>
<title>(Ruby) Tableless Model - vali29</title>
<link>http://snipplr.com/view/1849/tableless-model/</link>
<description><![CDATA[ <p>This is useful for using ActiveRecord validations without the ActiveRecord DB dependencies, this snippet is meant to be used with Textmate... create this in models/name_of_your_model to use.</p> ]]></description>
<pubDate>Wed, 27 Dec 2006 08:31:49 GMT</pubDate>
<guid>http://snipplr.com/view/1849/tableless-model/</guid>
</item>
<item>
<title>(Ruby) Rails validate email - vali29</title>
<link>http://snipplr.com/view/1248/rails-validate-email/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 27 Sep 2006 13:18:02 GMT</pubDate>
<guid>http://snipplr.com/view/1248/rails-validate-email/</guid>
</item>
<item>
<title>(Ruby) Ruby On Rails Form Helper with Image Submit Button - vali29</title>
<link>http://snipplr.com/view/866/ruby-on-rails-form-helper-with-image-submit-button/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 20 Aug 2006 22:51:17 GMT</pubDate>
<guid>http://snipplr.com/view/866/ruby-on-rails-form-helper-with-image-submit-button/</guid>
</item>
<item>
<title>(Ruby) Running RSpec for Rails from TextMate - vali29</title>
<link>http://snipplr.com/view/131/running-rspec-for-rails-from-textmate/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 30 Jun 2006 07:00:55 GMT</pubDate>
<guid>http://snipplr.com/view/131/running-rspec-for-rails-from-textmate/</guid>
</item>
<item>
<title>(Ruby) Post form data - vali29</title>
<link>http://snipplr.com/view/92/post-form-data/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 31 Dec 1969 19:00:00 GMT</pubDate>
<guid>http://snipplr.com/view/92/post-form-data/</guid>
</item>
<item>
<title>(Ruby) http get - vali29</title>
<link>http://snipplr.com/view/96/http-get/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 31 Dec 1969 19:00:00 GMT</pubDate>
<guid>http://snipplr.com/view/96/http-get/</guid>
</item>
</channel>
</rss>