<?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>On The Rhoads/Brad &#187; programming</title>
	<atom:link href="http://ontherhoads.org/brad/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://ontherhoads.org/brad</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 00:00:48 +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>Create A Unique File Name Using A MAC Address</title>
		<link>http://ontherhoads.org/brad/2011/11/create-a-unique-file-name-using-a-mac-address/</link>
		<comments>http://ontherhoads.org/brad/2011/11/create-a-unique-file-name-using-a-mac-address/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 18:04:49 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://ontherhoads.org/brad/?p=102</guid>
		<description><![CDATA[I needed a scheme to generate file names coming from different locations to a central server. The file names are generated in a script and I didn&#8217;t want to have to change the script for different locations. So I decided to include the MAC Address of the machine in the file name.
This little script grabs [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a scheme to generate file names coming from different locations to a central server. The file names are generated in a script and I didn&#8217;t want to have to change the script for different locations. So I decided to include the MAC Address of the machine in the file name.</p>
<p>This little script grabs the address and converts the : characters to a &#8211; and stores there result in a var called MAC.</p>
<p><code><br />
set - `ifconfig | grep -B 1 inet | head -1  | sed -e "s/\:/-/g"`<br />
MAC=$5<br />
</code></p>
<p>So if you run that command then do</p>
<p><code>echo $MAC</code></p>
<p>you&#8217;ll get something like this:</p>
<p><code>00-16-3E-11-09-20</code></p>


<!-- Begin TwitThis script (http://twitthis.com/) -->
<div style="text-align:left;">
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://s3.chuug.com/chuug.twitthis.resources/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
</div>
<!-- /End -->


<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2011%2F11%2Fcreate-a-unique-file-name-using-a-mac-address%2F&amp;title=Create+A+Unique+File+Name+Using+A+MAC+Address" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2011%2F11%2Fcreate-a-unique-file-name-using-a-mac-address%2F&amp;title=Create+A+Unique+File+Name+Using+A+MAC+Address" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2011%2F11%2Fcreate-a-unique-file-name-using-a-mac-address%2F&amp;title=Create+A+Unique+File+Name+Using+A+MAC+Address" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2011%2F11%2Fcreate-a-unique-file-name-using-a-mac-address%2F&amp;title=Create+A+Unique+File+Name+Using+A+MAC+Address', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2011%2F11%2Fcreate-a-unique-file-name-using-a-mac-address%2F&amp;t=Create+A+Unique+File+Name+Using+A+MAC+Address" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2011%2F11%2Fcreate-a-unique-file-name-using-a-mac-address%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2011%2F11%2Fcreate-a-unique-file-name-using-a-mac-address%2F&amp;title=Create+A+Unique+File+Name+Using+A+MAC+Address" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://ontherhoads.org/brad/2011/11/create-a-unique-file-name-using-a-mac-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Google Docs For Software Localization</title>
		<link>http://ontherhoads.org/brad/2009/09/using-google-docs-for-software-localization/</link>
		<comments>http://ontherhoads.org/brad/2009/09/using-google-docs-for-software-localization/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 20:59:52 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[I18N]]></category>

		<guid isPermaLink="false">http://ontherhoads.org/brad/?p=58</guid>
		<description><![CDATA[Google provides some truly amazing automatic translation tools.  And now translation is included in Google Docs. This turns out to be a powerful tool for software localization.
My current and probably long-term favorite development environment is Grails. Grails has great localization support build into it. An important piece of that is the messages.properties file, where [...]]]></description>
			<content:encoded><![CDATA[<p>Google provides some truly amazing <a href="http://translate.google.com/translate_tools?hl=en">automatic translation tools</a>.  And now translation is included in Google Docs. This turns out to be a powerful tool for software localization.</p>
<p>My current and probably long-term favorite development environment is Grails. Grails has great localization support build into it. An important piece of that is the <code>messages.properties</code> file, where you store all of your values that you want to be localized. </p>
<p>Actually, there can be lots of properties files. Grails actually ships with:</p>
<ul>
<li><code>messages_de.properties</code></li>
<li><code>messages_es.properties</code></li>
<li><code>messages_fr.properties</code></li>
<li><code>messages_it.properties</code></li>
<li><code>messages_ja.properties</code></li>
<li><code>messages_nl.properties</code></li>
<li><code>messages_pt_BR.properties</code></li>
<li><code>messages_ru.properties</code></li>
<li><code>messages_th.properties</code></li>
<li><code>messages_zh_CN.properties</code></li>
</ul>
<p>For example, <code>messages_fr.properties</code> is for French. </p>
<p>All the base files have translations of commonly used words. As you add more functionality to your application, you of course need more labels and buttons, etc. So you add them to your messages.properties file. Then all you have to do is translate your file into all these and other languages. The good news is that you can use Google Docs to get the job done. Or at least give you a head start on the translation process.</p>
<p>Just load your properties file into Google Docs and select Tools|Translate. <div id="attachment_59" class="wp-caption alignleft" style="width: 310px"><a href="http://ontherhoads.org/brad/wp-content/uploads/2009/09/translate.png"><img src="http://ontherhoads.org/brad/wp-content/uploads/2009/09/translate-300x123.png" alt="translate" title="translate" width="300" height="123" class="size-medium wp-image-59" /></a><p class="wp-caption-text">translate</p></div></p>


<!-- Begin TwitThis script (http://twitthis.com/) -->
<div style="text-align:left;">
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://s3.chuug.com/chuug.twitthis.resources/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
</div>
<!-- /End -->


<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F09%2Fusing-google-docs-for-software-localization%2F&amp;title=Using+Google+Docs+For+Software+Localization" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F09%2Fusing-google-docs-for-software-localization%2F&amp;title=Using+Google+Docs+For+Software+Localization" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F09%2Fusing-google-docs-for-software-localization%2F&amp;title=Using+Google+Docs+For+Software+Localization" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F09%2Fusing-google-docs-for-software-localization%2F&amp;title=Using+Google+Docs+For+Software+Localization', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F09%2Fusing-google-docs-for-software-localization%2F&amp;t=Using+Google+Docs+For+Software+Localization" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F09%2Fusing-google-docs-for-software-localization%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F09%2Fusing-google-docs-for-software-localization%2F&amp;title=Using+Google+Docs+For+Software+Localization" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://ontherhoads.org/brad/2009/09/using-google-docs-for-software-localization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling A Service From The Grails Console</title>
		<link>http://ontherhoads.org/brad/2009/08/calling-a-service-from-the-grails-console/</link>
		<comments>http://ontherhoads.org/brad/2009/08/calling-a-service-from-the-grails-console/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 07:47:05 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://ontherhoads.org/brad/?p=54</guid>
		<description><![CDATA[I&#8217;m doing my first project in Grails and intend to blog some of thing things I&#8217;m learning.
During development, the grails console is very useful for testing specific pieces of code without having to go through your whole system to get to that particular bit of code.
For the most part, you can just enter grails commands [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing my first project in Grails and intend to blog some of thing things I&#8217;m learning.</p>
<p>During development, the grails console is very useful for testing specific pieces of code without having to go through your whole system to get to that particular bit of code.</p>
<p>For the most part, you can just enter grails commands and hit execute. But apparently dependency inject doesn&#8217;t happen in the console. So there&#8217;s a bit of a trick to execute a service from the console.</p>
<p>If you had a service named MySecretService with a function named secretSquirell, you could access it via dependency injection in a domain class, a controller or another service by first adding</p>
<p><code>def mySecretService</code></p>
<p>then later you can say<br />
<code>def result = mySecretService.secretSquirell()</code></p>
<p>But to test in the console you need to do this:</p>
<p><code>def service = ctx.getBean("mySecretService")</code><br />
<code>def result = service.secretSquirell()</code></p>


<!-- Begin TwitThis script (http://twitthis.com/) -->
<div style="text-align:left;">
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://s3.chuug.com/chuug.twitthis.resources/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
</div>
<!-- /End -->


<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F08%2Fcalling-a-service-from-the-grails-console%2F&amp;title=Calling+A+Service+From+The+Grails+Console" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F08%2Fcalling-a-service-from-the-grails-console%2F&amp;title=Calling+A+Service+From+The+Grails+Console" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F08%2Fcalling-a-service-from-the-grails-console%2F&amp;title=Calling+A+Service+From+The+Grails+Console" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F08%2Fcalling-a-service-from-the-grails-console%2F&amp;title=Calling+A+Service+From+The+Grails+Console', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F08%2Fcalling-a-service-from-the-grails-console%2F&amp;t=Calling+A+Service+From+The+Grails+Console" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F08%2Fcalling-a-service-from-the-grails-console%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fontherhoads.org%2Fbrad%2F2009%2F08%2Fcalling-a-service-from-the-grails-console%2F&amp;title=Calling+A+Service+From+The+Grails+Console" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://ontherhoads.org/brad/2009/08/calling-a-service-from-the-grails-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

