<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Monkey's thumb</title>
	<atom:link href="http://blog.monkeysthumb.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.monkeysthumb.org</link>
	<description></description>
	<pubDate>Sun, 30 Nov 2008 08:20:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Refresh data from production</title>
		<link>http://blog.monkeysthumb.org/2008/11/30/refresh-data-from-production/</link>
		<comments>http://blog.monkeysthumb.org/2008/11/30/refresh-data-from-production/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 08:15:36 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.org/2008/11/30/refresh-data-from-production/</guid>
		<description><![CDATA[When working on web apps, it can really useful to be able to load production data into your development environment.

I am a sucker for anything that reduces typing so I put together a mysql&#95;tasks rails plugin for my MySQL backed applications which makes it as easy as

rake mysql:refresh_from_production

Which makes a tar gzipped snapshot of the [...]]]></description>
			<content:encoded><![CDATA[<p>When working on web apps, it can really useful to be able to load production data into your development environment.</p>

<p>I am a sucker for anything that reduces typing so I put together a <a href="http://github.com/mocoso/mysql_tasks/tree/master">mysql&#95;tasks</a> rails plugin for my MySQL backed applications which makes it as easy as</p>

<pre class="textmate-source"><span class="source source_shell">rake mysql:refresh_from_production</span></pre>

<p>Which makes a tar gzipped snapshot of the production database, downloads it into my development box and loads it into my development environment.</p>

<p>If you want to give it a go yourself then read these <a href="http://github.com/mocoso/mysql_tasks/tree/master/README.markdown">installation instructions for the mysql&#95;tasks plugin</a>.</p>

<p>This was inspired by <a href="http://www.nateclark.com/articles/2007/02/23/rails-rake-tasks-to-sync-your-remote-database-to-your-local-development-environment">the real Nate Clark</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/11/30/refresh-data-from-production/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Code Beautifier Textmate Bundle</title>
		<link>http://blog.monkeysthumb.org/2008/09/25/code-beautifier-textmate-bundle/</link>
		<comments>http://blog.monkeysthumb.org/2008/09/25/code-beautifier-textmate-bundle/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 12:33:14 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.org/2008/09/25/code-beautifier-textmate-bundle/</guid>
		<description><![CDATA[Textmate&#8217;s indent functionality does a passable job of formatting your code BUT there is a great deal of room for improvement.

Inspired by the Paul Lutus&#8217;s ruby beautifier script and Tim Burks&#8217;s post on making it into a Textmate bundle I&#8217;ve put together a Code Beautifier Textmate bundle

It only supports Ruby at present but does improve [...]]]></description>
			<content:encoded><![CDATA[<p>Textmate&#8217;s indent functionality does a passable job of formatting your code BUT there is a great deal of room for improvement.</p>

<p>Inspired by the Paul Lutus&#8217;s <a href="http://www.arachnoid.com/ruby/rubyBeautifier.html">ruby beautifier script</a> and Tim Burks&#8217;s <a href="http://blog.neontology.com/posts/2006/05/10/beautiful-ruby-in-textmate">post on making it into a Textmate bundle</a> I&#8217;ve put together a <a href="http://github.com/mocoso/code-beautifer.tmbundle/tree/master">Code Beautifier Textmate bundle</a></p>

<p>It only supports Ruby at present but does improve upon Textmate&#8217;s indent functionality, in particular it is better at indenting multiline statements and cleans up white space.</p>

<p>It&#8217;s all hosted on <a href="http://github.com/">Github</a> so if you want to make improvements then please fork away.</p>

<h2>Installation</h2>

<p>Run this:</p>

<pre class="textmate-source"><span class="source source_shell">cd <span class="keyword keyword_operator keyword_operator_tilde keyword_operator_tilde_shell">~</span>/Library/Application<span class="constant constant_character constant_character_escape constant_character_escape_shell">\ </span>Support/TextMate/Bundles
git clone git://github.com/mocoso/code-beautifier.tmbundle.git Code<span class="constant constant_character constant_character_escape constant_character_escape_shell">\ </span>Beautifier.tmbundle</span></pre>

<p>Then select &#8216;Bundles > Bundle Editor > Reload Bundles&#8217; from Textmate&#8217;s menus</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/09/25/code-beautifier-textmate-bundle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Screen Textmate Bundle</title>
		<link>http://blog.monkeysthumb.org/2008/09/09/screen-textmate-bundle/</link>
		<comments>http://blog.monkeysthumb.org/2008/09/09/screen-textmate-bundle/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 05:52:19 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.org/2008/09/09/screen-textmate-bundle/</guid>
		<description><![CDATA[When working on a rails project I usually have script/server, script/console and autotest all running in GNU Screen. Jamie Flournoy has already described why using GNU screen is better than plain old Terminal Tabs.

I&#8217;ve put together a Screen Textmate Bundle to make it easy to configure and open per project screen sessions.

Installation

Run this:

cd ~/Library/Application\ Support/TextMate/Bundles
git [...]]]></description>
			<content:encoded><![CDATA[<p>When working on a rails project I usually have script/server, script/console and autotest all running in <a href="http://en.wikipedia.org/wiki/GNU_Screen">GNU Screen</a>. Jamie Flournoy has already described why using <a href="http://www.pervasivecode.com/blog/2007/06/12/gnu-screen-and-my-screenrc/">GNU screen is better than plain old Terminal Tabs</a>.</p>

<p>I&#8217;ve put together a <a href="http://github.com/mocoso/screen.tmbundle/tree/master">Screen Textmate Bundle</a> to make it easy to configure and open per project screen sessions.</p>

<h2>Installation</h2>

<p>Run this:</p>

<pre class="textmate-source"><span class="source source_shell">cd <span class="keyword keyword_operator keyword_operator_tilde keyword_operator_tilde_shell">~</span>/Library/Application<span class="constant constant_character constant_character_escape constant_character_escape_shell">\ </span>Support/TextMate/Bundles
git clone git://github.com/mocoso/screen.tmbundle.git Screen.tmbundle</span></pre>

<h2>Set up your screen configuration for a project</h2>

<p>Create a .screenrc file <em>in your project directory</em> if you want to specify a particular configuration for your project.</p>

<p>For example for a Ruby on Rails project you might create a .screenrc file in your project directory like this</p>

<pre class="textmate-source"><span class="source source_shell"><span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> Have the server running in screen 1
</span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span>
</span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> Stuff is used so that when you exit the stuff-ed program, you drop back
</span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> to the bash shell for that screen instead of immediately exiting that
</span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> screen. This is useful for "^c, up-arrow, enter" restarting of programs.
</span>screen -t server 1
stuff <span class="string string_quoted string_quoted_double string_quoted_double_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">"</span>script/server\012<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">"</span></span>

<span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> Have autotest running in screen 2
</span>screen -t autotest 2
stuff <span class="string string_quoted string_quoted_double string_quoted_double_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">"</span>autotest\012<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">"</span></span>

<span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> Have the console running in screen 3 
</span>screen -t console 3
stuff <span class="string string_quoted string_quoted_double string_quoted_double_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">"</span>script/console\012<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">"</span></span>

<span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> Finally have a command line prompt at the project root in screen 4
</span>screen -t project_root 4</span></pre>

<h2>Usage</h2>

<p>Use this bundle&#8217;s &#8216;Start Session&#8217; command (ctrl-shift-s) to start (or reconnect to) your project&#8217;s screen session.</p>

<p>If you have created a .screenrc file in your project directory then this will be used to initialize the new session.</p>

<h2>Update (14th Sep 2008)</h2>

<p>On <a href="http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/" title="Like Slime, For Vim">Jonathon Palardy&#8217;s suggestion</a> I&#8217;ve added a &#8216;Send to Screen&#8217; command (ctrl-alt-c) that copies selected text (or current line if no selection made) to your project&#8217;s screen session. If you have multiple windows open in the session then it will paste to the currently selected window.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/09/09/screen-textmate-bundle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSV templating made easy in Rails</title>
		<link>http://blog.monkeysthumb.org/2008/06/27/csv-templating-made-easy-in-rails/</link>
		<comments>http://blog.monkeysthumb.org/2008/06/27/csv-templating-made-easy-in-rails/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 04:40:39 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[csv]]></category>

		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.dev/?p=29</guid>
		<description><![CDATA[CSV Builder is a simple little Rails (v2.1) plugin that makes it easy to write templates to generate CSV formatted output from your Rails application.

It does this by providing a little bit of plumbing gubbins to make a custom template handler from the FasterCSV gem.

So if you want to export data in CSV format from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/econsultancy/csv_builder/tree/master">CSV Builder</a> is a simple little Rails (v2.1) plugin that makes it easy to write templates to generate CSV formatted output from your Rails application.</p>

<p>It does this by providing a little bit of plumbing gubbins to make a custom template handler from the <a href="http://fastercsv.rubyforge.org">FasterCSV gem</a>.</p>

<p>So if you want to export data in CSV format from your rails app then install it like this</p>

<pre class="textmate-source"><span class="source source_shell"><span class="meta meta_paragraph meta_paragraph_text">sudo gem install fastercsv
./script/plugin install git://github.com/econsultancy/csv_builder.git</span></span></pre>

<p>This plugin was developed as part of project that I have been working on with <a href="http://www.e-consultancy.com">Econsultancy.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/06/27/csv-templating-made-easy-in-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Git with subversion: Part II (Practice)</title>
		<link>http://blog.monkeysthumb.org/2008/06/27/using-git-with-subversion-part-ii-practice/</link>
		<comments>http://blog.monkeysthumb.org/2008/06/27/using-git-with-subversion-part-ii-practice/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 04:38:37 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.org/?p=32</guid>
		<description><![CDATA[More tips on how to use Git with a Subversion repository to get some of the Git goodness, local branches, stashes and much more, without having to persuade everyone else on your project to migrate to Git

If you don&#8217;t already have git installed then see part I (Installation).

Clone you Subversion repository

Make a local clone of [...]]]></description>
			<content:encoded><![CDATA[<p>More tips on how to use <a href="http://git.or.cz/" title="Git version control">Git</a> with a Subversion repository to get some of the Git goodness, local branches, <a href="http://ariejan.net/2008/04/23/git-using-the-stash/" title="Using Git stashes">stashes</a> and much more, without having to persuade everyone else on your project to migrate to Git</p>

<p>If you don&#8217;t already have git installed then see <a href="/2008/5/26/using-git-with-subversion-part-i-installation">part I (Installation)</a>.</p>

<h2>Clone you Subversion repository</h2>

<p>Make a local clone of your subversion repository to work with.</p>

<p><strong>Warning:</strong> Git does not support svn:externals but luckily you <a href="http://errtheblog.com/posts/50-vendor-everything">vendor everything</a> with <a href="http://www.rubyinside.com/advent2006/12-piston.html">piston</a>, don&#8217;t you? If not then various people have written up <a href="http://blog.alieniloquent.com/2008/03/08/git-svn-with-svnexternals/">hacks for managing svn:externals</a> none of which are ideal but they will get you started.</p>

<p>Assuming you use a standard Subversion repository layout (with /trunk, /branches etc.) then this is as easy as</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git-svn clone http://svn.foo.org/project/trunk</span></span></pre>

<h2>Tweak your local Git repository</h2>

<p>There are a couple more things that you should do to the repository before beginning work</p>

<p>Firstly, tell Git about the files that Subversion ignores, using:</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git svn show-ignore >> .git/info/exclude</span></span></pre>

<p>This appears to work for some projects/Subversion installations and not others. If it doesn&#8217;t work you&#8217;ll need to create .git/info/exclude file in the project and add file patterns to exclude by hand.</p>

<p>Secondly, recreate any empty folders which are required by the project e.g. /log. You need to do this because Git does not track empty directories.</p>

<p>Now you are ready to go.</p>

<h2>Get to work</h2>

<ol>
<li><p>Make your changes</p>

<p>Make changes to the code base in just the same way as you would with Subversion</p></li>
<li><p>Commit your changes to your local master branch</p>

<p>Unless you have been working with <a href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html">local branches</a> this is easy as.</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git commit -a</span></span></pre>

<p>Which will commit all your changes to your local Git repository.</p>

<p>If you have added or removed files you will also need to use <a href="http://www.kernel.org/pub/software/scm/git/docs/git-add.html">git add</a> or <a href="http://www.kernel.org/pub/software/scm/git/docs/git-rm.html">git rm</a> to ensure all your changes are committed.</p></li>
<li><p>Update your local repository from Subversion</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git svn rebase</span></span></pre>

<p>This brings your local Git repository up to date with the central Subversion repository</p>

<p>It works just like <a href="http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html">git rebase</a> in that it rewinds your local commits, applies the latest changes from subversion, and then replays your local commits over the top. If there are merge issues you will be warned about them here.</p></li>
<li><p>Push your local commits back into subversion</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git svn dcommit</span></span></pre>

<p>This applies each of your local commits in turn to the subversion repository.</p></li>
<li><p>Repeat (go back to step 1.)</p></li>
</ol>

<h2>Further reading</h2>

<p>Now you&#8217;ve got started here are a couple of good resources for when you get stuck</p>

<ul>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html">Git manual</a></li>
<li><a href="http://www.sourcemage.org/Git_Guide">Quick Git guide</a></li>
<li><a href="http://git.or.cz/course/svn.html">Git - SVN Crash Course</a></li>
<li><a href="http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html">Git cheat sheet</a></li>
</ul>

<p>Best of luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/06/27/using-git-with-subversion-part-ii-practice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Git with Subversion: Part I (Installation)</title>
		<link>http://blog.monkeysthumb.org/2008/05/26/using-git-with-subversion-part-i-installation/</link>
		<comments>http://blog.monkeysthumb.org/2008/05/26/using-git-with-subversion-part-i-installation/#comments</comments>
		<pubDate>Mon, 26 May 2008 04:56:01 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.org/?p=34</guid>
		<description><![CDATA[You can use Git with a Subversion repository to get some of the Git goodness, local branches, stashes and much more, without having to persuade everyone else on your project to migrate to Git

Install Git

You need to install git-svn first, with MacPorts this is as easy as

sudo port install git-core +svn +bash_completion

And then to enable [...]]]></description>
			<content:encoded><![CDATA[<p>You can use <a href="http://git.or.cz/" title="Git version control">Git</a> with a Subversion repository to get some of the Git goodness, local branches, <a href="http://ariejan.net/2008/04/23/git-using-the-stash/" title="Using Git stashes">stashes</a> and much more, without having to persuade everyone else on your project to migrate to Git</p>

<h2>Install Git</h2>

<p>You need to install git-svn first, with <a href="http://www.macports.org/">MacPorts</a> this is as easy as</p>

<p><pre class="textmate-source"><span class="source source_shell">sudo port install git-core +svn +bash_completion</span></pre></p>

<p>And then to enable bash completion (thanks to <a href="http://effectif.com/2008/4/24/easy-git-svn-for-rails">Graham Ashton</a> for this tip)</p>

<p><pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">cp /opt/local/etc/bash_completion.d/git ~/.git-bash-completion.sh
echo '[ -f ~/.git-bash-completion.sh ] &amp;&amp; . ~/.git-bash-completion.sh' &gt;&gt; ~/.profile
. ~/.profile</span></span></pre></p>

<p>And for those without macports here are some <a href="http://git.or.cz/gitwiki/Installation">installation instructions</a></p>

<h2>TextMate integration</h2>

<p>If you use <a href="http://macromates.com/">TextMate</a> then install the <a href="http://blog.macromates.com/2008/git-bundle/">Git Bundle</a></p>

<p>And you can set TextMate as the editor for git commit messages by adding the following to ~/.profile</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">export GIT_EDITOR="mate -w"</span></span></pre>

<h2>Basic git configuration</h2>

<p>You should tell git who you are.</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git config --global user.name â€œyour nameâ€
git config --global user.email â€œyour.email.address@foo.barâ€</span></span></pre>

<p>If you are on OS X, then tell git to ignore .DSStore files in all your projects.</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git config --global core.excludesfile .gitexcludes</span></span></pre>

<p>And create a file ~/.gitexcludes with &#8216;.DSStore&#8217; in it.</p>

<p>This all you need to configure but there&#8217;s much more you can do with git config e.g. <a href="http://jbowes.dangerouslyinc.com/2006/12/19/my-gitconfig/">aliases for git commands</a> if you want to save those typing fingers.</p>

<h2>Coming soon</h2>

<p><a href="/2008/6/27/using-git-with-subversion-part-ii-practice">Using Git with Subversion - Part II (Practice)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/05/26/using-git-with-subversion-part-i-installation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8216;SELECT IN&#8217; in rails</title>
		<link>http://blog.monkeysthumb.org/2008/03/13/select-in-in-rails/</link>
		<comments>http://blog.monkeysthumb.org/2008/03/13/select-in-in-rails/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 06:44:38 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.dev/?p=27</guid>
		<description><![CDATA[#find supports select in conditions in just the way you would expect, so

Model.find(:all, :conditions =&#62; ["attribute IN (?)", [1,2,3]])

generates

SELECT * FROM models WHERE (attribute IN (1,2,3))


for MySQL.
]]></description>
			<content:encoded><![CDATA[<p><code>#find</code> supports select in conditions in just the way you would expect, so</p>

<pre class="textmate-source"><span class="source source_ruby source_ruby_rails"><span class="support support_class support_class_ruby">Model</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>find<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>all</span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>conditions</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">[</span><span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>attribute IN (?)<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">[</span><span class="constant constant_numeric constant_numeric_ruby">1</span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span><span class="constant constant_numeric constant_numeric_ruby">2</span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span><span class="constant constant_numeric constant_numeric_ruby">3</span><span class="punctuation punctuation_section punctuation_section_array punctuation_section_array_ruby">]]</span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span></span></pre>

<p>generates</p>

<pre class="textmate-source"><span class="source source_sql"><span class="keyword keyword_other keyword_other_DML keyword_other_DML_sql">SELECT</span> <span class="keyword keyword_operator keyword_operator_star keyword_operator_star_sql">*</span> <span class="keyword keyword_other keyword_other_DML keyword_other_DML_sql">FROM</span> models <span class="keyword keyword_other keyword_other_DML keyword_other_DML_sql">WHERE</span> (attribute <span class="keyword keyword_other keyword_other_data-integrity keyword_other_data-integrity_sql">IN</span> (<span class="constant constant_numeric constant_numeric_sql">1</span>,<span class="constant constant_numeric constant_numeric_sql">2</span>,<span class="constant constant_numeric constant_numeric_sql">3</span>))
</span></pre>

<p>for MySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/03/13/select-in-in-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Web apps on your desktop</title>
		<link>http://blog.monkeysthumb.org/2008/03/11/web-apps-on-your-desktop/</link>
		<comments>http://blog.monkeysthumb.org/2008/03/11/web-apps-on-your-desktop/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 06:42:47 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.dev/?p=25</guid>
		<description><![CDATA[Fluid is a site specific browser for OS X, that lets you can take the web apps that you use all the time out of your browser and on to the desktop.

I&#8217;ve been using it with Gmail to give it&#8217;s own application window, dock icon etc. on my desktop rather than it just being lost [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fluidapp.com/">Fluid</a> is a site specific browser for OS X, that lets you can take the web apps that you use all the time out of your browser and on to the desktop.</p>

<p>I&#8217;ve been using it with Gmail to give it&#8217;s own application window, dock icon etc. on my desktop rather than it just being lost amongst the 101 other tabs I have open.</p>

<p>If you use it with Gmail I recommend you install Todd Ditchendorf&#8217;s <a href="http://www.ditchnet.org/wp/2008/03/05/fluid-gmail-userscript/">user script</a> to stop a gmail popping up a blank window when you click on an external link.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/03/11/web-apps-on-your-desktop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MoreMoney gem</title>
		<link>http://blog.monkeysthumb.org/2008/02/29/moremoney-gem/</link>
		<comments>http://blog.monkeysthumb.org/2008/02/29/moremoney-gem/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 06:28:44 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.dev/?p=3</guid>
		<description><![CDATA[The Money gem is a great little utility for representing money in ruby.

However it&#8217;s formatting rules assume that the currency symbol will be a dollar ($) which is makes it far less useful for those of us who need to display other currencies, euros, pounds sterling (£) and yen (¥) to name a few.

Luckily Paolo [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://dist.leetsoft.com/api/money/">Money gem</a> is a great little utility for representing money in ruby.</p>

<p>However it&#8217;s formatting rules assume that the currency symbol will be a dollar ($) which is makes it far less useful for those of us who need to display other currencies, euros, pounds sterling (£) and yen (¥) to name a few.</p>

<p>Luckily Paolo Negri has come to the rescue with his <a href="http://moremoney.rubyforge.org/">More Money gem</a> which has all the goodness of the original money gem (configurable currencies and exchange rates) with added support for international currencies.</p>

<p>Installing it is as easy as</p>

<pre class="textmate-source"><span class="source source_shell">gem install more_money</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/02/29/moremoney-gem/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Select helper methods</title>
		<link>http://blog.monkeysthumb.org/2008/02/22/select-helper-methods/</link>
		<comments>http://blog.monkeysthumb.org/2008/02/22/select-helper-methods/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 06:32:30 +0000</pubDate>
		<dc:creator>joel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.monkeysthumb.dev/?p=8</guid>
		<description><![CDATA[Shining through has written an invaluable guide to the ruby on rails select helper methods.

Now if only someone would turn these into a documentation patch for rails.
]]></description>
			<content:encoded><![CDATA[<p><em>Shining through</em> has written an invaluable guide to the <a href="http://shiningthrough.co.uk/blog/show/6">ruby on rails select helper methods</a>.</p>

<p>Now if only someone would turn these into a documentation patch for rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.monkeysthumb.org/2008/02/22/select-helper-methods/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
