<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ted Naleid &#187; command line</title>
	<atom:link href="http://naleid.com/blog/category/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://naleid.com/blog</link>
	<description>Groovy, Grails and OS X tips and tricks</description>
	<lastBuildDate>Wed, 16 Jun 2010 17:38:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using a Unique Grails Working Directory for each Mercurial Branch</title>
		<link>http://naleid.com/blog/2010/05/07/using-a-unique-grails-working-directory-for-each-mercurial-branch/</link>
		<comments>http://naleid.com/blog/2010/05/07/using-a-unique-grails-working-directory-for-each-mercurial-branch/#comments</comments>
		<pubDate>Fri, 07 May 2010 18:07:40 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcut]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=184</guid>
		<description><![CDATA[At work, we&#8217;re using mercurial for our source control.  As we&#8217;ve released code to production we&#8217;ve needed to branch our repository to support what&#8217;s in production as well as ongoing development.  
By default, grails uses ~/.grails as the working directory.  If you&#8217;re doing branchy development, you can run into problems with this [...]]]></description>
			<content:encoded><![CDATA[<p>At work, we&#8217;re using <a href="http://mercurial.selenic.com/" onclick="pageTracker._trackPageview('/outgoing/mercurial.selenic.com/?referer=');">mercurial</a> for our source control.  As we&#8217;ve released code to production we&#8217;ve needed to branch our repository to support what&#8217;s in production as well as ongoing development.  </p>
<p>By default, grails uses <code>~/.grails</code> as the working directory.  If you&#8217;re doing branchy development, you can run into problems with this if you&#8217;ve got plugins installed in one branch that aren&#8217;t in the other.  Having a unique directory per branch prevents you from having to run <code>grails clean</code> all the time.</p>
<p>Here&#8217;s a quick shell script that changes the grails working directory to have the branch name as a suffix if your source is contained in a mercurial repository (ex: the default branch would be <code>~/.grails_default</code> and the 1.0 branch would be <code>~/.grails_1.0</code>).  If your application is not in a repo, it just uses the regular <code>~/.grails directory</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">HG_BRANCH</span>=<span style="color: #000000; font-weight: bold;">`</span>hg branch <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">GRAILS_SCRIPT</span>=<span style="color: #007800;">$GRAILS_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>grails
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$HG_BRANCH</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">GRAILS_WORK_DIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> ~<span style="color: #000000; font-weight: bold;">`/</span>.grails_<span style="color: #007800;">$HG_BRANCH</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;** grails working directory: <span style="color: #007800;">$GRAILS_WORK_DIR</span>&quot;</span>
	<span style="color: #007800;">$GRAILS_SCRIPT</span> -Dgrails.work.dir=<span style="color: #007800;">$GRAILS_WORK_DIR</span> $<span style="color: #000000; font-weight: bold;">@</span>
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;** default grails working directory&quot;</span>
	<span style="color: #007800;">$GRAILS_SCRIPT</span> $<span style="color: #000000; font-weight: bold;">@</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<p>Just save this script as &#8220;grails&#8221; and put it in your PATH before the $GRAILS_HOME/bin directory (also make sure that you&#8217;ve defined $GRAILS_HOME).  I have a ~/bin directory that&#8217;s the first thing in my PATH.</p>
<p>If you use the grails-debug command, you can repeat these steps for that, just change <code>GRAILS_SCRIPT</code> to <code>$GRAILS_HOME/bin/grails-debug</code>.</p>
<p>This same technique could easily be modified to be used for other source control systems such as git or subversion.</p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2010/05/07/using-a-unique-grails-working-directory-for-each-mercurial-branch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mercurial DVCS DevJam Presentation</title>
		<link>http://naleid.com/blog/2009/11/08/mercurial-dvcs-devjam-presentation/</link>
		<comments>http://naleid.com/blog/2009/11/08/mercurial-dvcs-devjam-presentation/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 02:43:20 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=106</guid>
		<description><![CDATA[This past week, I gave a presentation to the DevJam meeting on the advantages of using Mercurial, a DVCS (Distributed Version Control System) over tools like Subversion, Perforce, and ClearCase.

I&#8217;ve been using a mercurial repository at bitbucket to host the build-test-data grails plugin, as well as a number of other things that I&#8217;ve done.  [...]]]></description>
			<content:encoded><![CDATA[<p>This past week, I gave a presentation to the <a href="http://www.devjam.com/" onclick="pageTracker._trackPageview('/outgoing/www.devjam.com/?referer=');">DevJam</a> meeting on the advantages of using Mercurial, a DVCS (Distributed Version Control System) over tools like Subversion, Perforce, and ClearCase.<br />
<span id="more-106"></span><br />
I&#8217;ve been using a mercurial repository at bitbucket to host the build-test-data grails plugin, as well as a number of other things that I&#8217;ve done.  We&#8217;re also using it at work to hold our grails applications.  I find that the way Mercurial works fits better with my style of development over git, the other popular DVCS.</p>
<p>The turnout at the meeting was great, and a heated discussion followed the presentation (as it always does at that meeting).</p>
<p>I&#8217;ve checked the original keynote files along with a PDF version into <a href="http://bitbucket.org/tednaleid/dvcs-with-mercurial/src/" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/dvcs-with-mercurial/src/?referer=');">a mercurial repository</a>.</p>
<p>Here&#8217;s <a href="http://www.slideshare.net/tednaleid/mercurial-dvcs-presentation-to-devjam-1142009-2426116" onclick="pageTracker._trackPageview('/outgoing/www.slideshare.net/tednaleid/mercurial-dvcs-presentation-to-devjam-1142009-2426116?referer=');">the presentation on SlideShare</a>:</p>
<div style="width:425px;text-align:left" id="__ss_2426116"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/tednaleid/mercurial-dvcs-presentation-to-devjam-1142009-2426116" title="Mercurial DVCS presentation to DevJam 11/4/2009" onclick="pageTracker._trackPageview('/outgoing/www.slideshare.net/tednaleid/mercurial-dvcs-presentation-to-devjam-1142009-2426116?referer=');">Mercurial DVCS presentation to DevJam 11/4/2009</a><object style="margin:0px" width="600" height="500"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=dvcspresentation-091104221655-phpapp01&#038;stripped_title=mercurial-dvcs-presentation-to-devjam-1142009-2426116" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=dvcspresentation-091104221655-phpapp01&#038;stripped_title=mercurial-dvcs-presentation-to-devjam-1142009-2426116" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="500"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/" onclick="pageTracker._trackPageview('/outgoing/www.slideshare.net/?referer=');">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/tednaleid" onclick="pageTracker._trackPageview('/outgoing/www.slideshare.net/tednaleid?referer=');">tednaleid</a>.</div>
</div>
<p><script type="text/javascript">var dzone_style = '1';</script><br />
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/11/08/mercurial-dvcs-devjam-presentation/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Grails Testing Alias to Rerun Failed Tests</title>
		<link>http://naleid.com/blog/2009/11/03/grails-testing-alias-to-rerun-failed-tests/</link>
		<comments>http://naleid.com/blog/2009/11/03/grails-testing-alias-to-rerun-failed-tests/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 03:29:58 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[zshrc]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=99</guid>
		<description><![CDATA[A while ago I blogged about my grails testing aliases and how much time they save me.
I&#8217;ve made some enhancements to them in the interim that have made them even easier to use.  
The most important alias is gtaf, which is short for &#8220;grails test-app&#8221; for failed tests.
It will search through your test output [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I <a href="http://naleid.com/blog/2009/06/14/grails-testing-command-line-aliases/">blogged about my grails testing aliases</a> and how much time they save me.</p>
<p>I&#8217;ve made some enhancements to them in the interim that have made them even easier to use.  </p>
<p>The most important alias is <code>gtaf</code>, which is short for &#8220;grails test-app&#8221; for failed tests.</p>
<p>It will search through your test output directory and look for any tests that failed.  If it finds any, it will rerun only those tests.  Otherwise, it will rerun all tests.  That makes it easy to just use <code>gtaf</code> all the time.  If any tests fail, it will open them up using Console.app.  </p>
<p>If you&#8217;re not on OSX, or would like to use something else to view the failed test logs, just modify the <code>testlog</code> alias to do something different.<br />
<span id="more-99"></span><br />
There are alternative versions of it to only run failed integration tests (<code>gtaif</code> &#8211; Grails Test App Integration Failed), failed unit tests (<code>gtauf</code> &#8211; Grails Test App Unit Failed) or attach a debugger to the tests as they run (<code>gtadf</code> &#8211; Grails Test App Debug Failed).</p>
<p>These aliases, plus most of the rest of my zsh setup, is <a href="http://bitbucket.org/tednaleid/shared-zshrc/src/" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/shared-zshrc/src/?referer=');">available on bitbucket</a>.  If you haven&#8217;t used zsh before and are still using bash, I suggest <a href="http://naleid.com/blog/2009/05/13/shared-zshrc-file/">switching over for the numerous benefits that it gives you</a>.</p>
<p>Here&#8217;s the section of zshrc_general that has the grails testing aliases, just add this to your .zshrc/.bashrc and make sure to uncomment the appropriate GRAILS_TEST_LOG_DIRECTORY export if you&#8217;re not running grails 1.2 yet:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># grails &gt; 1.2</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GRAILS_TEST_LOG_DIRECTORY</span>=target<span style="color: #000000; font-weight: bold;">/</span>test-reports
&nbsp;
<span style="color: #666666; font-style: italic;"># grails &lt; 1.2</span>
<span style="color: #666666; font-style: italic;"># export GRAILS_TEST_LOG_DIRECTORY=test/reports</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># after grails-test if there were ERROR messages, you can open those logs with the Console.app using this</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">testlog</span>=<span style="color: #ff0000;">'for F in `grep -lE &quot;FAILED|Caused\ an\ ERROR&quot; $GRAILS_TEST_LOG_DIRECTORY/plain/*.txt`; do echo &quot;&gt;&gt;&gt; opening&quot; $F; open -a Console $F; done;'</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># grails-debug-suspend doesn't exist by default, it's a copy of grails-debug with the suspend flag changed to &quot;y&quot; so that</span>
<span style="color: #666666; font-style: italic;"># we can attach a remote debugger before it proceeds past startup</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># aliases where you can optionally pass in a set of tests to run (or no argument to run all tests in that group)</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gta</span>=grailsTestApp
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtad</span>=grailsTestAppDebug
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtau</span>=grailsTestAppUnit
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaud</span>=grailsTestAppUnitDebug
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtai</span>=grailsTestAppIntegration
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaid</span>=grailsTestAppIntegrationDebug
&nbsp;
<span style="color: #666666; font-style: italic;"># aliases that will rerun any failed tests (or all tests if there aren't any failed tests)</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaf</span>=grailsTestAppFailed
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtadf</span>=grailsTestAppDebugFailed
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtauf</span>=grailsTestAppUnitFailed
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaudf</span>=grailsTestAppUnitDebugFailed
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaif</span>=grailsTestAppIntegrationFailed
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaidf</span>=grailsTestAppIntegrationDebugFailed
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTestApp<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails <span style="color: #ff0000;">&quot;&quot;</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppFailed<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsFailedTests grails <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppDebug<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails-debug-suspend <span style="color: #ff0000;">&quot;&quot;</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppDebugFailed<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsFailedTests grails-debug-suspend <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppUnit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails <span style="color: #660033;">-unit</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppUnitFailed<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsFailedTests grails <span style="color: #660033;">-unit</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppUnitDebug<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails-debug-suspend <span style="color: #660033;">-unit</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppUnitDebugFailed<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsFailedTests grails-debug-suspend <span style="color: #660033;">-unit</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppIntegration<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails <span style="color: #660033;">-integration</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppIntegrationFailed<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsFailedTests grails <span style="color: #660033;">-integration</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppIntegrationDebug<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails-debug-suspend <span style="color: #660033;">-integration</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppIntegrationDebugFailed<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsFailedTests grails-debug-suspend <span style="color: #660033;">-integration</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsFailedTests<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #007800;">FAILED_TESTS</span>=<span style="color: #ff0000;">''</span>
	<span style="color: #000000; font-weight: bold;">for</span> F <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-lE</span> <span style="color: #ff0000;">&quot;FAILED|Caused\ an\ ERROR&quot;</span> <span style="color: #007800;">$GRAILS_TEST_LOG_DIRECTORY</span><span style="color: #000000; font-weight: bold;">/</span>plain<span style="color: #000000; font-weight: bold;">/*</span>.txt<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span>
		<span style="color: #007800;">FAILED_TESTS</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$FAILED_TESTS</span> <span style="color: #780078;">`echo $F | sed -E 's/.*TEST-(.*)Tests.txt/\1/g'`</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">done</span>;
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;failed tests: <span style="color: #007800;">$FAILED_TESTS</span>&quot;</span>
	grailsTest $<span style="color: #000000;">1</span> $<span style="color: #000000;">2</span> <span style="color: #007800;">$FAILED_TESTS</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTest<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Running: $1 test-app $2 $3 || testlog &quot;</span>
    <span style="color: #000000; font-weight: bold;">time</span> $<span style="color: #000000;">1</span> test-app $<span style="color: #000000;">2</span> $<span style="color: #000000;">3</span> <span style="color: #000000; font-weight: bold;">||</span> testlog
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>I believe that they&#8217;ll also work fine as-is in bash, though I haven&#8217;t tested them.</p>
<p><script type="text/javascript">var dzone_style = '1';</script><br />
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/11/03/grails-testing-alias-to-rerun-failed-tests/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Poor Man&#8217;s &#8220;top&#8221; for MySQL</title>
		<link>http://naleid.com/blog/2009/06/18/poor-mans-top-for-mysql/</link>
		<comments>http://naleid.com/blog/2009/06/18/poor-mans-top-for-mysql/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 05:39:04 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=57</guid>
		<description><![CDATA[I&#8217;m currently working at a startup that&#8217;s small enough that we don&#8217;t have a dedicated DBA and I&#8217;ve been doing a lot of mysql maintenance work recently.  I wanted a quick dashboard for which commands were currently running and how long they&#8217;ve been running for.  Sort of like top but for mysql.
Combining the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working at a startup that&#8217;s small enough that we don&#8217;t have a dedicated DBA and I&#8217;ve been doing a lot of mysql maintenance work recently.  I wanted a quick dashboard for which commands were currently running and how long they&#8217;ve been running for.  Sort of like <a href="http://en.wikipedia.org/wiki/Top_(Unix)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Top_Unix?referer=');">top</a> but for mysql.</p>
<p>Combining the unix <a href="http://en.wikipedia.org/wiki/Watch_(Unix)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Watch_Unix?referer=');">&#8220;watch&#8221;</a> command with the mysql <a href="http://dev.mysql.com/doc/refman/5.1/en/show-processlist.html" onclick="pageTracker._trackPageview('/outgoing/dev.mysql.com/doc/refman/5.1/en/show-processlist.html?referer=');">&#8220;show processlist&#8221;</a> command gives me what I&#8217;m looking for.  A quick, self-updating status of the current state of the database.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">watch <span style="color: #660033;">-n</span> <span style="color: #000000;">5</span> <span style="color: #660033;">--differences</span> <span style="color: #ff0000;">&quot;mysql -u username -psekrit -e 'show processlist'&quot;</span></pre></div></div>

<p>Shows something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Every 5.0s: mysql <span style="color: #660033;">-n</span> <span style="color: #000000;">5</span> <span style="color: #660033;">-u</span> username <span style="color: #660033;">-psekrit</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'show processlist'</span>                                   Thu Jun <span style="color: #000000;">18</span> 05:<span style="color: #000000;">25</span>:<span style="color: #000000;">14</span> <span style="color: #000000;">2009</span>
&nbsp;
Id      User    Host       db      Command Time    State         Info
<span style="color: #000000;">3141</span>    admin   localhost  mydb    Query   <span style="color: #000000;">34978</span>   freeing items SELECT <span style="color: #c20cb9; font-weight: bold;">id</span>, <span style="color: #7a0874; font-weight: bold;">type</span>, active, email FROM user WHERE email
<span style="color: #000000;">3146</span>    admin   localhost  mydb    Sleep   <span style="color: #000000;">0</span>                     NULL       
<span style="color: #000000;">24876</span>   root    localhost  NULL    Query   <span style="color: #000000;">0</span>       NULL          show processlist</pre></div></div>

<p>Where the &#8220;time&#8221; column is the number of seconds the query has been running, and Info holds the actual query (you can use &#8220;show full processlist&#8221; to see the full query).</p>
<p>Watch is a nice little linux util that runs a command every &#8220;n&#8221; seconds (it defaults to 2 seconds).  If you use the &#8211;differences switch, it will highlight the differences between one update and another.  I use watch for all kinds of monitoring activities, such as watching a directory to see a file grow in size as it gets transfered.</p>
<p>Here&#8217;s a quick shell function that you can add to your .bashrc/.bash_profile/.zshrc to use on arbitrary hosts:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mysqltop<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #007800;">MYSQL_OPTS</span>=$<span style="color: #000000; font-weight: bold;">@</span>
    watch <span style="color: #660033;">-n</span> <span style="color: #000000;">5</span> <span style="color: #660033;">--differences</span> <span style="color: #ff0000;">&quot;mysql <span style="color: #007800;">$MYSQL_OPTS</span> -e 'show processlist'&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Then just pass in any creds/host info you need like a normal mysql command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqltop <span style="color: #660033;">-u</span> ted <span style="color: #660033;">-psekrit1</span> <span style="color: #660033;">-h</span> example.com <span style="color: #660033;">-P</span> <span style="color: #000000;">3307</span></pre></div></div>

<p>If you&#8217;re on linux, you probably already have &#8220;watch&#8221; installed.  If you&#8217;re on OSX, you probably don&#8217;t, but you can get it quickly through macports.  Install macports, make sure &#8220;port&#8221; is in your path and run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> watch</pre></div></div>

<p>There is also a command called <a href="http://jeremy.zawodny.com/mysql/mytop/" onclick="pageTracker._trackPageview('/outgoing/jeremy.zawodny.com/mysql/mytop/?referer=');">mytop</a> that you can get which looks like the same thing, but prints out the processlist details with some nicer formatting and a little extra information.  It&#8217;s in macports, but it has a number of dependencies including mysql so if you didn&#8217;t install mysql through macports, you might want to stick with what I have above or get it another way.</p>
<p>(EDIT: updated with bash function)</p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/06/18/poor-mans-top-for-mysql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Grails plugin build-test-data 0.2.1 released</title>
		<link>http://naleid.com/blog/2009/06/15/grails-plugin-build-test-data-021-released/</link>
		<comments>http://naleid.com/blog/2009/06/15/grails-plugin-build-test-data-021-released/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 05:37:20 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[integration testing]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=56</guid>
		<description><![CDATA[I&#8217;ve just released version 0.2.1 of the build-test-data grails plugin.
The build-test-data plugin makes creating integration test data easy.  It decorates your domain objects with a &#8220;build&#8221; method that will create new domain instances and will automatically populate required fields with data and save it to the database.  This enables you to create more [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released version 0.2.1 of the <a href="http://bitbucket.org/tednaleid/grails-test-data/wiki/Home" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/grails-test-data/wiki/Home?referer=');">build-test-data grails plugin</a>.</p>
<p>The build-test-data plugin makes creating integration test data easy.  It decorates your domain objects with a &#8220;build&#8221; method that will create new domain instances and will automatically populate required fields with data and save it to the database.  This enables you to create more maintainable tests where the data you create is targeted specifically at the situations you&#8217;re trying to test, without having to go through all of the ceremony of creating the rest of the object graph that you don&#8217;t care about.</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// creates a new Book instance with all required fields </span>
<span style="color: #808080; font-style: italic;">// (like the Author that the book belongsTo) populated</span>
<span style="color: #000000; font-weight: bold;">def</span> b <span style="color: #669966;">=</span> <span style="color: #aaaadd; font-weight: bold;">Book</span>.<span style="color: #006600;">build</span><span style="color: #669966;">&#40;</span><span style="color: #669966;">&#41;</span></pre></div></div>

<p>To learn more about the basics of the build-test-data plugin, see <a href="http://naleid.com/blog/2009/04/14/grails-build-test-data-01-plugin-released/">this blog post</a> and check out the <a href="http://bitbucket.org/tednaleid/grails-test-data/wiki/BasicUsage" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/grails-test-data/wiki/BasicUsage?referer=');">Basic Usage</a> and <a href="http://bitbucket.org/tednaleid/grails-test-data/wiki/SampleCode" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/grails-test-data/wiki/SampleCode?referer=');">Sample Code</a> wiki pages.<br />
<span id="more-56"></span><br />
To install, just run the install-plugin grails command (this will also upgrade an existing plugin):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">grails install-plugin build-test-data</pre></div></div>

<p>The 0.2 version of the plugin includes a number of enhancements and <a href="http://bitbucket.org/tednaleid/grails-test-data/issues/" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/grails-test-data/issues/?referer=');">bugfixes</a>.  Major highlights include:</p>
<ul>
<li>
JodaTime support (along with any other persistable class with a zero argument constructor)
</li>
<li>
much easier and more powerful config files (see the <a href="http://bitbucket.org/tednaleid/grails-test-data/wiki/TestDataConfig" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/grails-test-data/wiki/TestDataConfig?referer=');">TestDataConfig</a> wiki page for details and examples)
</li>
</ul>
<p>Additionally, the code has been cleaned up and refactored to be easier to understand.</p>
<p>See the <a href="http://bitbucket.org/tednaleid/grails-test-data/wiki/ReleaseNotes" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/grails-test-data/wiki/ReleaseNotes?referer=');">Release Notes</a> wiki page for full details. </p>
<p>I&#8217;d be interested to hear any further feedback on this plugin and other features that people might find useful.  I&#8217;ve successfully been using it on my current project and it&#8217;s been a big help in keeping my tests clean and free from superfluous object construction code, as well as flexible in that it automatically adapts to a changing domain model.</p>
<p><script type="text/javascript">var dzone_url = 'http://naleid.com/blog/2009/06/15/grails-plugin-build-test-data-021-released/';</script><br />
<script type="text/javascript">var dzone_style = '1';</script><br />
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/06/15/grails-plugin-build-test-data-021-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Grails Testing Command Line Aliases</title>
		<link>http://naleid.com/blog/2009/06/14/grails-testing-command-line-aliases/</link>
		<comments>http://naleid.com/blog/2009/06/14/grails-testing-command-line-aliases/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 05:30:57 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=55</guid>
		<description><![CDATA[I&#8217;ve recently thrown together a few different command line aliases that have been very helpful in my grails development and I thought others might benefit from them.
The aliases are primarily just the first letter of the words in the command, which makes them easy to remember (and saves on typing).  Some examples:

gta   [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently thrown together a few different command line aliases that have been very helpful in my grails development and I thought others might benefit from them.</p>
<p>The aliases are primarily just the first letter of the words in the command, which makes them easy to remember (and saves on typing).  Some examples:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gta                   <span style="color: #666666; font-style: italic;"># grails test-app</span>
gtai                  <span style="color: #666666; font-style: italic;"># grails test-app -integration</span>
gtaud AuthorService   <span style="color: #666666; font-style: italic;"># grails-debug-suspend test-app -unit AuthorService</span></pre></div></div>

<p><span id="more-55"></span>My testing aliases are probably my most often used grails aliases.  They&#8217;re all &#8220;gta&#8221; (for grails test-app) followed by an optional &#8220;u&#8221; or &#8220;i&#8221; (to run only unit or integration).</p>
<p>There&#8217;s also an alternate for each of those commands with a &#8220;d&#8221; on the end for &#8220;debug&#8221;.  I call a script named &#8220;grails-debug-suspend&#8221; which is simply a copy of the normal &#8220;grails-debug&#8221; command, but with the &#8220;suspend&#8221; flag set to &#8220;y&#8221;.  This causes the application to stop right away till you attach a remote debugger.  This is very useful for quick tests as its often the case that the code gets past where you have breakpoints set before you launch the debugger.</p>
<p>These commands all also let you pass in the name of a specific test class so that only that test runs.</p>
<p>The overall format for all of the aliases is:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gta<span style="color: #7a0874; font-weight: bold;">&#91;</span>i<span style="color: #000000; font-weight: bold;">|</span>u<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>d<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>TestClassName<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>This example suspends until a debugger is attached and then runs the AuthorServiceTests.groovy unit test class:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gtaud AuthorService</pre></div></div>

<p>These aliases are all set up to run the &#8220;testlog&#8221; alias if a failing exit code is returned from the test run.  This searches through all of the testlog results for any failures and automatically opens up each failing testlog in the OSX Console.app (if you&#8217;re on another platform, just substitute a different editor).  I wrote <a href="http://naleid.com/blog/2008/03/13/using-the-osx-consoleapp-to-aid-grails-test-driven-development/">a more detailed post a while ago about how nice Console.app is for looking at grails test logs</a>.</p>
<p>Lastly, each command is also run with the unix &#8220;time&#8221; command, which I find useful to help me see how long my tests are taking and get a feel over time for the overall performance of the system under test.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># grails-debug-suspend doesn't exist by default, it's a copy of grails-debug with the suspend flag changed to &quot;y&quot; so that</span>
<span style="color: #666666; font-style: italic;"># we can attach a remote debugger before it proceeds past startup</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gta</span>=grailsTestApp
<span style="color: #000000; font-weight: bold;">function</span> grailsTestApp<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails <span style="color: #ff0000;">&quot;&quot;</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtad</span>=grailsTestAppDebug
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppDebug<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails-debug-suspend <span style="color: #ff0000;">&quot;&quot;</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtau</span>=grailsTestAppUnit
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppUnit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails <span style="color: #660033;">-unit</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaud</span>=grailsTestAppUnitDebug
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppUnitDebug<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails-debug-suspend <span style="color: #660033;">-unit</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtai</span>=grailsTestAppIntegration
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppIntegration<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails <span style="color: #660033;">-integration</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gtaid</span>=grailsTestAppIntegrationDebug
<span style="color: #000000; font-weight: bold;">function</span> grailsTestAppIntegrationDebug<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> grailsTest grails-debug-suspend <span style="color: #660033;">-integration</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grailsTest<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Running: $1 test-app $2 $3 || testlog &quot;</span>
    <span style="color: #000000; font-weight: bold;">time</span> $<span style="color: #000000;">1</span> test-app $<span style="color: #000000;">2</span> $<span style="color: #000000;">3</span> <span style="color: #000000; font-weight: bold;">||</span> testlog
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># after grails test if there were ERROR messages, you can open those logs with the Console.app using this</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">testlog</span>=<span style="color: #ff0000;">'for F in `grep -lE &quot;FAILED|Caused\ an\ ERROR&quot; test/reports/plain/*.txt`; do echo &quot;&gt;&gt;&gt; opening&quot; $F; open -a Console $F; done;'</span></pre></div></div>

<p>You can place these aliases in your .bashrc/.bash_profile in your home directory (you can also use them with <a href="http://www.cygwin.com/" onclick="pageTracker._trackPageview('/outgoing/www.cygwin.com/?referer=');">cygwin</a> on windows.</p>
<p>Alternatively, if you&#8217;re using zsh (or interested in switching from bash), I&#8217;ve got all of my zsh setup <a href="http://naleid.com/blog/2009/05/13/shared-zshrc-file/">shared in a source control repo</a> in a format that&#8217;s easy to use and extend for yourself.</p>
<p>This is the modified grails-debug command called grails-debug-suspend, just put it somewhere in your PATH and make it executable (chmod +x grails-debug-suspend):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">DIRNAME</span>=<span style="color: #007800;">$GRAILS_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin
. <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DIRNAME</span>/startGrails&quot;</span>
&nbsp;
<span style="color: #007800;">JAVA_OPTS</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$JAVA_OPTS</span> -Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005&quot;</span>
startGrails org.codehaus.groovy.grails.cli.GrailsScriptRunner <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/06/14/grails-testing-command-line-aliases/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>OSX AppleScript command line util to eject all removable disks</title>
		<link>http://naleid.com/blog/2009/05/26/osx-applescript-command-line-util-to-eject-all-removable-disks/</link>
		<comments>http://naleid.com/blog/2009/05/26/osx-applescript-command-line-util-to-eject-all-removable-disks/#comments</comments>
		<pubDate>Wed, 27 May 2009 03:16:28 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[eject]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=53</guid>
		<description><![CDATA[On my MacBook pro, I&#8217;ve got 4 removable hard drives (2 physical in 2 partitions each) and a JungleDisk mount.
I found it painful to manually eject each individual drive in the finder so I threw together this quick AppleScript to eject all the disks.

tell application &#34;Finder&#34;
	eject &#40;every disk&#41;
end tell

Just open up /Applications/AppleScript/ScriptEditor.app and paste that [...]]]></description>
			<content:encoded><![CDATA[<p>On my MacBook pro, I&#8217;ve got 4 removable hard drives (2 physical in 2 partitions each) and a <a href="http://www.jungledisk.com/" onclick="pageTracker._trackPageview('/outgoing/www.jungledisk.com/?referer=');">JungleDisk mount</a>.</p>
<p>I found it painful to manually eject each individual drive in the finder so I threw together this quick AppleScript to eject all the disks.</p>

<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Finder&quot;</span>
	<span style="color: #0066ff;">eject</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0033;">every</span> <span style="color: #0066ff;">disk</span><span style="color: #000000;">&#41;</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></pre></div></div>

<p>Just open up /Applications/AppleScript/ScriptEditor.app and paste that in.  Then choose &#8220;Save As&#8221; and pick &#8220;Application&#8221;.  That will compile the script and create a .app file that you can click on to run, or you can put it in your path and execute it there.</p>
<p>I think the same kind of script could be created with the command line &#8220;diskutil eject&#8221; command, but this seemed cleaner as I wasn&#8217;t able to come up with a generic way to figure out which disks were &#8220;ejectable&#8221; and which weren&#8217;t.  AppleScript is able to figure that all out for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/05/26/osx-applescript-command-line-util-to-eject-all-removable-disks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Shared zshrc file</title>
		<link>http://naleid.com/blog/2009/05/13/shared-zshrc-file/</link>
		<comments>http://naleid.com/blog/2009/05/13/shared-zshrc-file/#comments</comments>
		<pubDate>Wed, 13 May 2009 05:20:02 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[zshrc]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=52</guid>
		<description><![CDATA[Over the years, I&#8217;ve had a number of requests for me to share my zshrc file with friends and coworkers.  In the past, I&#8217;ve normally trimmed out the sensitive parts by hand and then e-mailed the most useful stuff.  I&#8217;ve always intended to make this an easier process and I&#8217;ve finally gotten around [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years, I&#8217;ve had a number of requests for me to share my zshrc file with friends and coworkers.  In the past, I&#8217;ve normally trimmed out the sensitive parts by hand and then e-mailed the most useful stuff.  I&#8217;ve always intended to make this an easier process and I&#8217;ve finally gotten around to it.</p>
<p>I&#8217;ve created a new <a href="http://bitbucket.org/tednaleid/shared-zshrc/" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/shared-zshrc/?referer=');">bitbucket repository to hold my shared zshrc configuration</a>.  You can get it for yourself by cloning the repository:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
hg clone http:<span style="color: #000000; font-weight: bold;">//</span>bitbucket.org<span style="color: #000000; font-weight: bold;">/</span>tednaleid<span style="color: #000000; font-weight: bold;">/</span>shared-zshrc<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p><span id="more-52"></span><br />
If you don&#8217;t have mercurial installed, you can just <a href="http://bitbucket.org/tednaleid/shared-zshrc/downloads/" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/shared-zshrc/downloads/?referer=');">grab the compressed archive of your choice from the downloads page</a>.</p>
<p>I&#8217;d suggest cloning/unzipping into your home directory, but you can put it wherever you want.</p>
<p>There&#8217;s an install.sh script in there that will create a new ~/.zshrc file.   If you have an existing .zshrc file, just move it out of the way and run the install script (it won&#8217;t let you whack an existing file).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>install.sh</pre></div></div>

<p>That created .zshrc file will load up all of my shared settings and aliases from wherever you have the shared-zshrc directory.  It also will look for a host specific file where any sensitive info, or host dependent info can be added.  I normally put things like my change directory and ssh aliases in here.</p>
<p>I probably created around half of these files myself, but I couldn&#8217;t tell you for the life of me where the majority of the other half came from.  This file has accreted over the years like barnacles on a ship.</p>
<p>Some of these commands originally started out in either a tcsh file (or was it ksh?), I eventually moved to bash, and then a couple of years ago, a coworker showed me the wonders of zsh and I haven&#8217;t looked back.</p>
<p>If you&#8217;re still using bash, give zsh a try.  Changing your shell is as easy as running this command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chsh</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">zsh</span></pre></div></div>

<h2>ZSH Specific Stuff</h2>
<p>Most of the zsh shell configuration magic is in <a href="http://bitbucket.org/tednaleid/shared-zshrc/src/tip/zshrc_compinstall" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/shared-zshrc/src/tip/zshrc_compinstall?referer=');">zshrc_compinstall</a>.  Some features include:</p>
<ul>
<li>shared history across shells</li>
<li>command spelling correction</li>
<li>vastly improved tab completion of commands (including keyboard navigation of potential matches)</li>
<li>file globbing that makes finding files easy (try <code>ls **/*.txt</code> to recursively search for all txt files, much easier than <code>find . -name "*.txt"</code></li>
<li>automatically using pushd for cd commands, use &#8220;dh&#8221; to see a history of your directories, use cd -N to go back N directories in your history (ex: <code>cd -3</code>)</li>
</ul>
<h2>Useful Aliases</h2>
<p>Some of the most useful aliases in <a href="http://bitbucket.org/tednaleid/shared-zshrc/src/tip/zshrc_general" onclick="pageTracker._trackPageview('/outgoing/bitbucket.org/tednaleid/shared-zshrc/src/tip/zshrc_general?referer=');">zshrc_general</a> include:</p>
<h3>Grep through Aliases (ag)</h3>
<p>I often forget what some of my less often used aliases are, but I know what commands they use.  I&#8217;ve set up &#8220;ag&#8221; (alias grep) to help me search through my aliases and find the right one:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> ag python
<span style="color: #007800;">webshare</span>=<span style="color: #ff0000;">'python -m SimpleHTTPServer'</span></pre></div></div>

<h3>Grepping History (gh)</h3>
<p>Great for finding commands in your history that you can only remember part of.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  gh grails
  ...
  <span style="color: #000000;">582</span>  grails create-app testDates
  <span style="color: #000000;">584</span>  grails create-domain-class Foo
  <span style="color: #000000;">585</span>  grails generate-all Foo
  <span style="color: #000000;">587</span>  <span style="color: #7a0874; font-weight: bold;">cd</span> grails-app
  <span style="color: #000000;">591</span>  grails generate-views Foo
  <span style="color: #000000;">592</span>  grails run-app</pre></div></div>

<h3>Global Alias &#8211; GV &#8211; to &#8220;grep -v&#8221;</h3>
<p>Grep is great for finding things, but often you find too much and need to slice stuff out.  If you use &#8220;grep -v&#8221; that finds all lines that <b>don&#8217;t</b> match a pattern.  The global alias &#8220;GV&#8221; that makes this even easier.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">   <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-ri</span> foo</pre></div></div>

<p>If that finds too much stuff (say catalina log files and svn files that you don&#8217;t care about), just slice them out with GV:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">   <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-ri</span> foo GV <span style="color: #c20cb9; font-weight: bold;">svn</span> GV catalina</pre></div></div>

<p>That will remove any lines that have &#8220;svn&#8221; or &#8220;catalina&#8221; anywhere in them (including the file name).</p>
<p>I think that rc files tend to be very personal things, what works for me likely won&#8217;t work for you exactly as it is.  But I also love to look at other people&#8217;s rc files to grab the things that look interesting.  Feel free to poke through mine and grab whatever strikes your fancy.</p>
<p>There&#8217;s a ton of other stuff in there that I use every day, including sections specific to version control (svn and hg) as well as groovy/grails shortcuts.  Feel free to poke around and ask me any questions about what something does.</p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/05/13/shared-zshrc-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Enabling HTTPS support in curl installed through MacPorts on OSX</title>
		<link>http://naleid.com/blog/2009/03/16/enabling-https-support-in-curl-installed-through-macports-on-osx/</link>
		<comments>http://naleid.com/blog/2009/03/16/enabling-https-support-in-curl-installed-through-macports-on-osx/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 02:06:03 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=48</guid>
		<description><![CDATA[I ran into an issue today when trying to use curl to post something to an https endpoint on one of my Grails applications.  Apparently, recent macports versions of curl don&#8217;t have full ssl support enabled by default (I have no idea why, this seems like one of the basic use cases of curl).
This [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into an issue today when trying to use curl to post something to an https endpoint on one of my Grails applications.  Apparently, recent macports versions of curl don&#8217;t have full ssl support enabled by default (I have no idea why, this seems like one of the basic use cases of curl).</p>
<p>This is what I was seeing:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> curl <span style="color: #660033;">-k</span> https:<span style="color: #000000; font-weight: bold;">//</span>www.google.com
curl: <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Protocol https not supported or disabled <span style="color: #000000; font-weight: bold;">in</span> libcurl</pre></div></div>

<p>After a bunch of fiddling around looking at the Portfile (located at <code>/opt/local/var/macports/sources/rsync.macports.org/release/ports/net/curl/Portfile</code>), I saw that there was something called a variant that seemed to talk about ssl support.  </p>
<p>I&#8217;d never needed to install a variant of a port before, but it&#8217;s actually pretty easy to do.  Just add a &#8220;+&#8221; with the variant name at the end of the install command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> curl +ssl</pre></div></div>

<p><span id="more-48"></span><br />
After that, curl did exactly what I was expecting it to:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> curl <span style="color: #660033;">-k</span> https:<span style="color: #000000; font-weight: bold;">//</span>www.google.com
<span style="color: #000000; font-weight: bold;">&lt;</span>HTML<span style="color: #000000; font-weight: bold;">&gt;&lt;</span>HEAD<span style="color: #000000; font-weight: bold;">&gt;&lt;</span>meta http-equiv=<span style="color: #ff0000;">&quot;content-type&quot;</span> <span style="color: #007800;">content</span>=<span style="color: #ff0000;">&quot;text/html;charset=utf-8&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>TITLE<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000;">302</span> Moved<span style="color: #000000; font-weight: bold;">&lt;/</span>TITLE<span style="color: #000000; font-weight: bold;">&gt;&lt;/</span>HEAD<span style="color: #000000; font-weight: bold;">&gt;&lt;</span>BODY<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>H1<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000;">302</span> Moved<span style="color: #000000; font-weight: bold;">&lt;/</span>H1<span style="color: #000000; font-weight: bold;">&gt;</span>
The document has moved
<span style="color: #000000; font-weight: bold;">&lt;</span>A <span style="color: #007800;">HREF</span>=<span style="color: #ff0000;">&quot;http://www.google.com&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>here<span style="color: #000000; font-weight: bold;">&lt;/</span>A<span style="color: #000000; font-weight: bold;">&gt;</span>.
<span style="color: #000000; font-weight: bold;">&lt;/</span>BODY<span style="color: #000000; font-weight: bold;">&gt;&lt;/</span>HTML<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>So if you&#8217;ve already got curl installed with macports, you&#8217;ll probably want to uninstall it, then clean to be sure, then reinstall with the variant name:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port uninstall curl
<span style="color: #c20cb9; font-weight: bold;">sudo</span> port clean curl
<span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> curl +ssl</pre></div></div>

<p>From the documentation, it appears that it also works for the upgrade command as well, so I believe you could force an upgrade and get it to install the curl ssl variant with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #660033;">-f</span> upgrade curl +ssl</pre></div></div>

<p>I haven&#8217;t tested this though, so I can&#8217;t say with 100% certainty that it will work.  </p>
<p>UPDATE: Brian Michelich tried this and ran into some issues because he had git-core installed through macports.  Git-core relies on curl so forcing an upgrade could potentially bork anything that relies on curl.  The safest thing is likely to uninstall curl as macports will let you know if anything relies on it before you remove it.</p>
<p>If you want to check if you have any dependencies, you can use the &#8220;dependents&#8221; command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">port dependents curl</pre></div></div>

<p>I hope this helps someone (possibly me, in 6 months when I&#8217;m setting up my next computer :). </p>
]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/03/16/enabling-https-support-in-curl-installed-through-macports-on-osx/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Bash/Zsh aliases to switch Groovy and Grails version</title>
		<link>http://naleid.com/blog/2009/03/08/bashzsh-aliases-to-switch-groovy-and-grails-version/</link>
		<comments>http://naleid.com/blog/2009/03/08/bashzsh-aliases-to-switch-groovy-and-grails-version/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 00:58:34 +0000</pubDate>
		<dc:creator>tednaleid</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcut]]></category>

		<guid isPermaLink="false">http://naleid.com/blog/?p=46</guid>
		<description><![CDATA[I work on a couple of different grails projects that use a variety of versions of groovy and grails.  I&#8217;ve thrown together a quick shell script that makes it easy to create a new alias to switch between different versions depending on what project you&#8217;re working with.

function switchGrails&#40;&#41; &#123;
    echo &#34;Switching [...]]]></description>
			<content:encoded><![CDATA[<p>I work on a couple of different grails projects that use a variety of versions of groovy and grails.  I&#8217;ve thrown together a quick shell script that makes it easy to create a new alias to switch between different versions depending on what project you&#8217;re working with.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> switchGrails<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Switching to groovy version: $1&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Switching to grails version: $2&quot;</span>
    <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>groovy,grails<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
    <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>groovy
    <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>grails
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Done!&quot;</span>
    <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-latr</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>groovy,grails<span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">g104</span>=<span style="color: #ff0000;">'switchGrails &quot;groovy-1.5.7&quot; &quot;grails-1.0.4&quot;'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">g11rc2</span>=<span style="color: #ff0000;">'switchGrails &quot;groovy-1.6.0&quot; &quot;grails-1.1-RC2&quot;'</span></pre></div></div>

<p>You can create your own aliases like the ones above to switch to the groovy/grails combinations that you happen to be working with.  </p>
<p>Just stick the code above in your .profile/.bashrc/.zshrc file and restart your shell to make the aliases available.</p>
<p>This function assumes that you&#8217;ve got you&#8217;ve got groovy and grails installed in your /usr/local directory and that you use a symlink at /usr/local/groovy that $GROOVY_HOME is pointed to and /usr/local/grails that $GRAILS_HOME is pointed to.  If those assumptions aren&#8217;t correct for you, you&#8217;ll have to tweak the script.</p>
<p>It also uses &#8220;sudo&#8221; as it assumes that /usr/local is owned by root and not by your logged in user.  If you&#8217;ve chowned the directory to yourself, you can remove the sudo (and the need to enter your password).</p>
<p>Now it&#8217;s easy for me to switch between different projects by just typing the appropriate alias:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pollux<span style="color: #000000; font-weight: bold;">%</span> g104
Switching to groovy version: groovy-1.5.7
Switching to grails version: grails-1.0.4
Done<span style="color: #000000; font-weight: bold;">!</span>
lrwxr-xr-x  <span style="color: #000000;">1</span> root  wheel  <span style="color: #000000;">23</span> Mar  <span style="color: #000000;">8</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">55</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>groovy -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>groovy-1.5.7
lrwxr-xr-x  <span style="color: #000000;">1</span> root  wheel  <span style="color: #000000;">23</span> Mar  <span style="color: #000000;">8</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">55</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>grails -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>grails-1.0.4
&nbsp;
&nbsp;
pollux<span style="color: #000000; font-weight: bold;">%</span> g11rc2 
Switching to groovy version: groovy-1.6.0
Switching to grails version: grails-<span style="color: #000000;">1.1</span>-RC2
Done<span style="color: #000000; font-weight: bold;">!</span>
lrwxr-xr-x  <span style="color: #000000;">1</span> root  wheel  <span style="color: #000000;">23</span> Mar  <span style="color: #000000;">8</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">56</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>groovy -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>groovy-1.6.0
lrwxr-xr-x  <span style="color: #000000;">1</span> root  wheel  <span style="color: #000000;">25</span> Mar  <span style="color: #000000;">8</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">56</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>grails -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>grails-<span style="color: #000000;">1.1</span>-RC2</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://naleid.com/blog/2009/03/08/bashzsh-aliases-to-switch-groovy-and-grails-version/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
