<?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>No Wasted Moves &#187; Geekery</title>
	<atom:link href="http://www.nowastedmoves.com/category/geekery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nowastedmoves.com</link>
	<description>Not Just another WordPress weblog</description>
	<lastBuildDate>Wed, 31 Aug 2011 11:44:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>One More Thing Q&amp;A Series by Anthony Agius on Pozible</title>
		<link>http://www.nowastedmoves.com/2011/geekery/one-more-thing-qa-series-by-anthony-agius-on-pozible/</link>
		<comments>http://www.nowastedmoves.com/2011/geekery/one-more-thing-qa-series-by-anthony-agius-on-pozible/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 11:42:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=151</guid>
		<description><![CDATA[So Anthony (@decryption) is gearing up to do a follow up to his very successful One More Thing iOS conference. I think it&#8217;s really important to have a healthy indy events culture around stuff that matters. So much good comes out of them, it&#8217;d be a shame if projects like this never got off the [...]]]></description>
			<content:encoded><![CDATA[<p>So Anthony (<a href="http://www.twitter.com/decryption">@decryption</a>) is gearing up to do a follow up to his very successful One More Thing iOS conference. </p>
<p>I think it&#8217;s really important to have a healthy indy events culture around stuff that matters. So much good comes out of them, it&#8217;d be a shame if projects like this never got off the ground. </p>
<p>I hope you join me in supporting him to keep doing good work that matters. Lots of people will benefit and more importantly, it shows that it&#8217;s worth taking on the risk to do projects that matter.</p>
<p><iframe frameborder="0" scrolling="no" src="http://www.pozible.com/index.php/embed_iframe/project/2227/13216/1" width="485px" height="255px"></iframe><br />
<a href="http://www.pozible.com/index.php/archive/index/2227/description/0/13216#.Tl4d7haJw7w.wordpress">One More Thing Q&amp;A Series by Anthony Agius on Pozible</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2011/geekery/one-more-thing-qa-series-by-anthony-agius-on-pozible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco Cupcakes!</title>
		<link>http://www.nowastedmoves.com/2009/geekery/cisco-cupcakes/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/cisco-cupcakes/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 00:44:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=134</guid>
		<description><![CDATA[I&#8217;m back teaching again, something that makes me very happy. Got a couple of Cisco courses, and we&#8217;re getting to the end of semester. In class last Thursday, the conversation took a turn towards cupcakes. Before you know it, behold: The collision of sugar and segments. Packets and piping. Cisco and Cupcakes. And now, should [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m back teaching again, something that makes me very happy. Got a couple of Cisco courses, and we&#8217;re getting to the end of semester. In class last Thursday, the conversation took a turn towards cupcakes.</p>
<p>Before you know it, behold:<br />
<a title="Cisco Cupcakes! by geoffconet, on Flickr" href="http://www.flickr.com/photos/geoffco/4107724322/"><img src="http://farm3.static.flickr.com/2548/4107724322_1733487469.jpg" alt="Cisco Cupcakes!" width="500" height="375" /></a><br />
The collision of sugar and segments. Packets and piping. Cisco and Cupcakes.<br />
<a title="Networked Cupcakes by geoffconet, on Flickr" href="http://www.flickr.com/photos/geoffco/4107724040/"><img src="http://farm3.static.flickr.com/2507/4107724040_89a1527e5a.jpg" alt="Networked Cupcakes" width="500" height="375" /></a></p>
<p>And now, should probably get back to CCNP prep!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/cisco-cupcakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally got my CCNA!</title>
		<link>http://www.nowastedmoves.com/2009/certification/finally-got-my-ccna/</link>
		<comments>http://www.nowastedmoves.com/2009/certification/finally-got-my-ccna/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 05:07:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Certification]]></category>
		<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=131</guid>
		<description><![CDATA[So, I finally sat and passed my CCNA exam, and now almost a month later, I&#8217;ve finally posted about it here! The biggest take away for me from the whole process was how much easier it was to focus and study once I&#8217;d booked the exam in. It was hard work, sure, but once I&#8217;d [...]]]></description>
			<content:encoded><![CDATA[<p>So, I finally sat and passed my CCNA exam, and now almost a month later, I&#8217;ve finally posted about it here!</p>
<p>The biggest take away for me from the whole process was how much easier it was to focus and study once I&#8217;d booked the exam in. It was hard work, sure, but once I&#8217;d taken away the option of doing it later, or doing some other exam first perhaps, everything happened a lot quicker.</p>
<p>Having said all that, it was certainly my intention to start studying for the next exam straight after I did the CCNA. Obviously not having learned from experience, I have taken until pretty much right now to actually decide what that next exam should be. Should I start my CCNP? Do CCNA Security? Knock out a couple of Sun exams? All perfectly valid options, and by having options I was thinking about them, and not getting any study done. So, as of 20 minutes ago, I&#8217;ve booked in for my CCNA Security exam for late September.</p>
<p>Now that I&#8217;ve got my date, I know what I need to do between now and then. Looking forward to the challenge!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/certification/finally-got-my-ccna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Commonality in Unix Command Errors</title>
		<link>http://www.nowastedmoves.com/2009/geekery/commonality-in-unix-command-errors/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/commonality-in-unix-command-errors/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 05:19:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=127</guid>
		<description><![CDATA[We&#8217;ve got a script that parses install logs for each Solaris client looking for errors and then generating a summary report of what happened and what went wrong. It works well, but until recently, it&#8217;s been quite limited as it only flagged variations of the words Error and Warning. That was ok originally, but the [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve got a script that parses install logs for each Solaris client looking for errors and then generating a summary report of what happened and what went wrong. It works well, but until recently, it&#8217;s been quite limited as it only flagged variations of the words Error and Warning. That was ok originally, but the install scripts got more complicated and it&#8217;s now been out grown.</p>
<p>After seeing a few variations on &#8220;cannot&#8221;, including &#8220;can not&#8221;, &#8220;can&#8217;t&#8221; and &#8220;could not&#8221; and &#8220;couldn&#8217;t&#8221; showing up in the logs, I thought it&#8217;d be interesting to audit some of the common unix commands we use in the scripts and see what sort of words they use to describe errors. It turned out to be quite a long list.</p>
<p>These are all taken from Solaris 10 10/08 clients. Where relevant I&#8217;ve kept them case sensitive.</p>
<h3>cp/mv/ln</h3>
<ul>
<li>failed / Failed</li>
<li>cannot</li>
<li>could not</li>
<li>unable</li>
<li>not</li>
<li>can&#8217;t</li>
<li>Insufficient</li>
<li>exceeds</li>
<li>Invalid</li>
</ul>
<h3>mkdir</h3>
<ul>
<li>Failed</li>
<li>but is not</li>
<li>not permitted</li>
</ul>
<h3>touch</h3>
<ul>
<li>bad</li>
<li>cannot</li>
</ul>
<h3>chown</h3>
<ul>
<li>can&#8217;t</li>
<li>unknown</li>
<li>invalid</li>
<li>too large</li>
</ul>
<h3>chmod</h3>
<ul>
<li>can&#8217;t</li>
<li>could not</li>
<li>invalid</li>
<li>required</li>
<li>not permitted</li>
<li>WARNING</li>
<li>ERROR</li>
</ul>
<h3>ls</h3>
<ul>
<li>can&#8217;t</li>
</ul>
<h3>ksh</h3>
<ul>
<li>too big</li>
<li>required</li>
<li>couldn&#8217;t</li>
<li>prohibited</li>
<li>cannot</li>
<li>Bad / bad</li>
<li>failure</li>
<li>unknown</li>
<li>invalid</li>
<li>is not</li>
<li>not</li>
<li>denied</li>
<li>too many</li>
<li>corrupted</li>
<li>can&#8217;t</li>
<li>out of range</li>
<li>exceeds</li>
<li>already</li>
<li>restricted</li>
<li>missing</li>
<li>expected</li>
<li>failed</li>
<li>requires</li>
</ul>
<p>The thing about most unix commands is that they&#8217;re generally not very chatty. There&#8217;s a good chance if they&#8217;re producing any sort of output at all, it&#8217;s probably an error of some description. With that in mind, it&#8217;s quite possible there&#8217;s a much more elegant way of writing the parse scripts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/commonality-in-unix-command-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why can&#8217;t I share an automounted directory using NFS in Solaris 10?</title>
		<link>http://www.nowastedmoves.com/2009/geekery/why-cant-i-share-an-automounted-directory-using-nfs-in-solaris-10/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/why-cant-i-share-an-automounted-directory-using-nfs-in-solaris-10/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 23:05:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[automount]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[Solaris10]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=76</guid>
		<description><![CDATA[Don&#8217;t worry, it&#8217;s not a trick question. I honestly don&#8217;t know just yet. If I did, I&#8217;d be writing a post called &#8220;How to share an automounted directory using NFS in Solaris 10&#8243;. I dream that one day soon I can do that. In the meantime, I&#8217;m writing up the scenario that doesn&#8217;t work in [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t worry, it&#8217;s not a trick question. I honestly don&#8217;t know just yet. If I did, I&#8217;d be writing a post called &#8220;How to share an automounted directory using NFS in Solaris 10&#8243;. I dream that one day soon I can do that.</p>
<p>In the meantime, I&#8217;m writing up the scenario that doesn&#8217;t work in the hope that it a) provides me with a blinding flash of insight, b) lets other people know it&#8217;s not just them or c) prompts someone who knows the answer to drop it in the comments. Come on, you know you want to!</p>
<h3>The General Idea</h3>
<p>I&#8217;ve got a machine running Solaris 10 10/08 with several user accounts. Home directories for these accounts are in /export/home/. They are being automounted in /home. I want to share the /home/username directories using  NFS. Should be simple right?</p>
<h3>The Setup</h3>
<p>/etc/auto_master:</p>
<pre>/home   auto_home   -nobrowse</pre>
<p>/etc/auto_home:</p>
<pre>fred box1:/export/home/fred</pre>
<p>/etc/dfs/dfstab:</p>
<pre>share -F nfs /home/fred</pre>
<p>After confirming that NFS is running and online (svcs -a | grep nfs), we activate the shares:</p>
<pre># shareall
share_nfs: /home/fred: Operation not applicable</pre>
<p>Sharing /export/home/fred works just fine.</p>
<p>The official Sun docs suggest that the &#8220;Operation not applicable&#8221; error means I should contact my vendor for an upgrade. Right. I&#8217;m fairly sure this was working in Solaris 8, but need to double check.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/why-cant-i-share-an-automounted-directory-using-nfs-in-solaris-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XScreenSaver in Solaris 10</title>
		<link>http://www.nowastedmoves.com/2009/geekery/xscreensaver-in-solaris-10/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/xscreensaver-in-solaris-10/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 08:12:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=73</guid>
		<description><![CDATA[It seems to be that XScreenSaver won&#8217;t load for regular users in Solaris 10 (update 6, 10/08) using JDS. This means that a regular user can&#8217;t lock their workstation screen or have the screensaver come on. Typically, an error message along the lines of &#8220;XScreenSaver failed to load&#8221; pops up when the user logs in. [...]]]></description>
			<content:encoded><![CDATA[<p>It seems to be that XScreenSaver won&#8217;t load for regular users in Solaris 10 (update 6, 10/08) using JDS.</p>
<p>This means that a regular user can&#8217;t lock their workstation screen or have the screensaver come on. Typically, an error message along the lines of &#8220;XScreenSaver failed to load&#8221; pops up when the user logs in.</p>
<p>Pretty annoying all round.<br />
Happily, it&#8217;s an easy fix. Edit your <code>.profile</code> and add <code>/usr/openwin/bin</code> to your <code>$PATH</code> variable. </p>
<p>Log out. When you log back in, you should see a &#8220;Lock Screen&#8221; option on your menu and screensavers should kick in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/xscreensaver-in-solaris-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPod Shuffle Unboxing</title>
		<link>http://www.nowastedmoves.com/2009/geekery/ipod-shuffle-unboxing/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/ipod-shuffle-unboxing/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:04:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=61</guid>
		<description><![CDATA[So after a little bit of stuffing around with missed deliveries, I finally have my new iPod Shuffle. Happy days! I ordered it last Wednesday morning. I think it was the size of it, and wanting to buy something so that Mactalk got a cut that won me over so quickly. This seemed like the [...]]]></description>
			<content:encoded><![CDATA[<p>So after a little bit of stuffing around with missed deliveries, I finally have my new iPod Shuffle. Happy days!</p>
<p>I ordered it last Wednesday morning. I think it was the size of it, and wanting to buy something so that <a href="http://www.mactalk.com.au" target="_blank">Mactalk</a> got a cut that won me over so quickly. This seemed like the perfect opportunity.</p>
<div id="attachment_60" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-60" title="ipod-shuffle-unboxing-small-1" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-1.jpg" alt="iPod Shuffle TNT Package ready to open" width="640" height="480" /><p class="wp-caption-text">iPod Shuffle TNT Package ready to open</p></div>
<p>Obviously it came well packaged&#8230;</p>
<div id="attachment_59" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-59" title="ipod-shuffle-unboxing-small-2" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-2.jpg" alt="iPod Shuffle in box" width="640" height="480" /><p class="wp-caption-text">iPod Shuffle in box</p></div>
<p>The only difference to the standard retail packaging was a bit of white plastic wrapped around the outside of the plastic box.</p>
<div id="attachment_56" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-56" title="ipod-shuffle-unboxing-small-5" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-5.jpg" alt="You could pretty  much buy these in vending machines now... " width="640" height="480" /><p class="wp-caption-text">You could pretty  much buy these in vending machines now... </p></div>
<div id="attachment_57" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-57" title="ipod-shuffle-unboxing-small-4" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-4.jpg" alt="iPod Shuffle in packaging, ready to crack open :-)" width="640" height="480" /><p class="wp-caption-text">iPod Shuffle in packaging, ready to crack open <img src='http://www.nowastedmoves.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p></div>
<div id="attachment_58" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-58" title="ipod-shuffle-unboxing-small-3" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-3.jpg" alt="Headphone plug and 3 way switch" width="640" height="398" /><p class="wp-caption-text">Headphone plug and 3 way switch</p></div>
<div id="attachment_55" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-55" title="ipod-shuffle-unboxing-small-6" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-6.jpg" alt="iPod Shuffle from the back." width="640" height="547" /><p class="wp-caption-text">iPod Shuffle from the back.</p></div>
<p><img class="alignnone size-full wp-image-54" title="ipod-shuffle-unboxing-small-7" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-7.jpg" alt="ipod-shuffle-unboxing-small-7" width="640" height="480" /></p>
<p>I got mine laser engraved. Figured if I was buying online, I may as well take advantage of the free engraving service. I won&#8217;t be getting a case for it (really not that much to protect!), so the engraving will be pretty much the only unique identifier on it. I suspect lots of people will end up with these, so easier to have it personalised. The engraving is top quality too. There is about 1cm of horizontal space to engrave on, and they&#8217;ve fitted 12 perfectly legible characters on one line. Apple really have a good machine for doing this!</p>
<div id="attachment_53" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-53" title="ipod-shuffle-unboxing-small-8" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-8.jpg" alt="iPod Shuffle sync cable" width="640" height="519" /><p class="wp-caption-text">iPod Shuffle sync cable</p></div>
<p>The USB sync cable is perfectly compact, just like the shuffle. I plug it into the back of my desktop keyboard and &#8211; kind of obviously &#8211; it seems made for it. It&#8217;s about 7-8cm long, so it won&#8217;t be a hassle to pack if you want to use your shuffle as removable storage.</p>
<div id="attachment_52" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-52" title="ipod-shuffle-unboxing-small-9" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-9.jpg" alt="It really is tiny." width="640" height="480" /><p class="wp-caption-text">It really is tiny.</p></div>
<p>I&#8217;ll reiterate what pretty much everyone is saying. This iPod is TINY. A miniturised Nano. About the size of a recent model USB drive, the build quality is amazing for something this small. It&#8217;s machined. Refined. Engineered. Metallic. It&#8217;s got that all metal feel that I love about my MacBook Pro. It&#8217;s all class.</p>
<div id="attachment_51" class="wp-caption alignnone" style="width: 650px"><img class="size-full wp-image-51" title="ipod-shuffle-unboxing-small-10" src="http://www.nowastedmoves.com/wp-content/uploads/2009/03/ipod-shuffle-unboxing-small-10.jpg" alt="The whole kit." width="640" height="538" /><p class="wp-caption-text">The whole kit.</p></div>
<p>All of the playback controls are on the headphones. The controls work well, the voiceover thing is pretty cool. Much better than I&#8217;d expected based on the promo video on the Apple site. The sound quality is decent enough for what I plan on using this for (commuting &amp; exercise). When I want big sound, I&#8217;ll plug my big headphones into the laptop. So, I&#8217;m happy. It&#8217;ll be interesting to see if a remote cable accessory is on the market soon to allow people who do what to use their own headphones to do so if they wish.</p>
<p>All in all, I&#8217;m really happy with it. I wouldn&#8217;t want it as my only iPod, but for having on hand for when you just want to listen to something and don&#8217;t hugely care what, it is perfect. Well done Apple!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/ipod-shuffle-unboxing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Handling line endings in Ruby on Rails</title>
		<link>http://www.nowastedmoves.com/2009/geekery/handling-line-endings-in-ruby-on-rails/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/handling-line-endings-in-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 04:49:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=43</guid>
		<description><![CDATA[I&#8217;ve been working on a Rails app that automatically builds shell scripts. It pulls a bunch of prewritten code out of an SQLite database and writes it out in order to a text file. Only problem is there are some rouge line ending sneeking to the database. I&#8217;m developing on Solaris 10 where the default [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a Rails app that automatically builds shell scripts. It pulls a bunch of prewritten code out of an SQLite database and writes it out in order to a text file.</p>
<p>Only problem is there are some rouge line ending sneeking to the database. I&#8217;m developing on Solaris 10 where the default line ending is a line feed character (LF, 0x0A). For reasons I don&#8217;t understand, Rails and/or SQLite is using an LF CR combination on all of the code that was entered through a text field and saved to the database. When it gets spat back out into the shell script text file and I try to execute it, Korn chokes. Korn expects LF line endings in text files and that&#8217;s all there is to it.</p>
<p>After poking around to uncover where the line ending might be being set, I decided it&#8217;d be easier to tweak the three places in the Ruby script where code was being outputted to the text file and modify the line ending there.</p>
<pre>finalscript &lt;&lt; assertion.snippet.code.delete("\x0D") &lt;&lt; "\n"</pre>
<p>Essentially we&#8217;re deleting all of the CR characters from the chunk of code, leaving just the LF which keeps Korn happy.</p>
<p>I&#8217;m not totally happy with it as a solution, but it works, it was fast and cheap and solves something that probably doesn&#8217;t affect too many people.</p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/handling-line-endings-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why is my iPhone 3G screen so flakey?</title>
		<link>http://www.nowastedmoves.com/2009/geekery/why-is-my-iphone-3g-screen-so-flakey/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/why-is-my-iphone-3g-screen-so-flakey/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 03:48:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[moisturiser]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=24</guid>
		<description><![CDATA[For much of the time since I got my iPhone last July, I&#8217;ve found the touch screen to be quite intermittant. Sometimes it works brilliantly, often I might as well have a phone wth no buttons. I don&#8217;t know what kind of dark magic Apple have used to make the iPhone work, but it only [...]]]></description>
			<content:encoded><![CDATA[<p>For much of the time since I got my iPhone last July, I&#8217;ve found the touch screen to be quite intermittant. Sometimes it works brilliantly, often I might as well have a phone wth no buttons.</p>
<p>I don&#8217;t know what kind of dark magic Apple have used to make the iPhone work, but it only responds to fingers (or at least, nothing else I&#8217;ve tried tapping it with &#8211; pens, pencils, erasers &#8211; works).</p>
<p>It later occured to me that my hands are often quite dry. No skin crackingly dry, but they could probably do with moisturising more often than I do.  So I began a quick experiment.</p>
<p>Every time my screen becomes non responsive, I go moisten my hands under a tap. In a pinch, I lick my finger (yeh gross, whatever. This is *science*.)</p>
<p>Seems to do the trick pretty much every time.</p>
<p>Guess it&#8217;s off to buy some moisturiser then &#8211; for the sake of my hands and my iPhone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/why-is-my-iphone-3g-screen-so-flakey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Ruby on Rails on Solaris 10 10/08</title>
		<link>http://www.nowastedmoves.com/2009/geekery/installing-ruby-on-rails-on-solaris-10-1008-2/</link>
		<comments>http://www.nowastedmoves.com/2009/geekery/installing-ruby-on-rails-on-solaris-10-1008-2/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 05:10:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.nowastedmoves.com/?p=16</guid>
		<description><![CDATA[Following OpenSolaris rendering itself completely non-booting, I&#8217;ve moved back to running Solaris 10 u6 (10/08) on my Ultra20. I&#8217;m really not sure what caused the crash, but I couldn&#8217;t recover from in the amount of time I wanted to spend (not much) and really I should be focussed on Solaris 10 anyway. So, how to [...]]]></description>
			<content:encoded><![CDATA[<p>Following OpenSolaris rendering itself completely non-booting, I&#8217;ve moved back to running Solaris 10 u6 (10/08) on my Ultra20. I&#8217;m really not sure what caused the crash, but I couldn&#8217;t recover from in the amount of time I wanted to spend (not much) and really I should be focussed on Solaris 10 anyway.</p>
<p>So, how to setup the new box &#8211; knowing the end goal is to have a solid development workstation I can use for Ruby, Rails and Solaris development as well as general testing and hacking around&#8230; These are my notes. While the end result does work, it took a fair bit of effort getting there. It was a learning experience and ultimately I&#8217;m glad of it.</p>
<p><span id="more-16"></span></p>
<h3>Solaris 10 10/08 Install</h3>
<p>First up, the base Solaris install. I chose the &#8220;Developer&#8221; cluster of packages, it&#8217;s pretty much everything except drivers and OEM stuff for hardware I don&#8217;t have installed. I realised a bit later that if I wanted to use ZFS on my root disk (which I kind of did), I would have to restart the install in text mode. I didn&#8217;t do that this time, so no ZFS root disk for me. Oh well.</p>
<p>Once you&#8217;ve got Solaris installed and booting, log in as root. Add</p>
<pre>/usr/sfw/bin</pre>
<p>and</p>
<pre>/usr/ccs/bin</pre>
<p>to your PATH.</p>
<h3>Fix some library incompatibilities before they become problems&#8230;</h3>
<p>I learned this the roundabout hard way. In my notebook, this bit is right at the end, but I thought I&#8217;d save you the hassle of several extra recompile/test cycles by including it up here.</p>
<p>It seems the default libiconv library in Solaris doesn&#8217;t do as much as Ruby and Rails expects it to, so when you go to create a new rails app, ActiveRecord throws a tanty and gives you no joy at all. Basically you see an error along the lines of (Iconv::InvalidEncoding).</p>
<p>Happily, it&#8217;s fairly straightforward to fix. We just need to install a copy of the GNU libiconv library.</p>
<p>Grab a copy from sunfreeware.com. I got version 1.11. Extract the archive then change in to the created directory.</p>
<pre>./configure --prefix=/usr
make
make install</pre>
<p>If you do this at this stage of the install, chances are good that you&#8217;ll completely avoid the problems I ran into. This is generally a good thing, but it takes away visability for you of what the problem actually looked like. If you skip this step, get to the end of installing everything and go to create your new rails app and get the Iconv error from ActiveRecord, you simply need to come back to this step, install the GNU libiconv library then recompile &amp; reinstall ruby. You won&#8217;t need to reinstall RubyGems or Rails, they&#8217;ll use the new Ruby which is using the new libiconv and all will be right in the world.</p>
<h3>Compile &amp; Install Ruby</h3>
<p>Download and unpack the lastest stable Ruby source code. I went with 1.8.7. Then it&#8217;s the usual configure, make, make install routine &#8211; watch the &#8211;prefix and &#8211;exec-prefix options. By default they go to /usr/local. On Solaris it seems to work better as /usr</p>
<pre>./configure --enable-pthread --prefix=/usr --exec-prefix=/usr
make
make install</pre>
<p>All of the Ruby executables (ruby, irb, etc) should end up in /usr/bin.</p>
<h3>Setup RubyGems</h3>
<p>Download and extract the lastest RubyGems package. I got 1.3.1. Change into the directory just created and run:</p>
<pre>ruby setup.rb</pre>
<h3>Install Rails</h3>
<p>Possibly the easiest part of the whole process:</p>
<pre>gem install rails</pre>
<p>The particular machine I was installing on sits behind a HTTP proxy, so I needed to add a HTTP_PROXY variable to my environment. Once I&#8217;d done that, gem had no problems reaching the outside world.</p>
<h3>Did it work!?</h3>
<pre>mkdir railswork
cd railswork
rails demosite
cd demosite
script/server</pre>
<p>You should then be able to access http://localhost:3000/ in your browser and see a Rails &#8220;It worked&#8221; page. Woohoo! If you don&#8217;t, I wish you good luck on your continuing Rails on Solaris education <img src='http://www.nowastedmoves.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.nowastedmoves.com/2009/geekery/installing-ruby-on-rails-on-solaris-10-1008-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

