<?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>Adam Pierce &#187; General</title>
	<atom:link href="http://www.doctort.org/adam/category/general/feed" rel="self" type="application/rss+xml" />
	<link>http://www.doctort.org/adam</link>
	<description>Maker of Finest Quality Digital Things</description>
	<lastBuildDate>Thu, 24 Jun 2010 01:17:57 +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>OMG, I&#8217;ve been hacked!</title>
		<link>http://www.doctort.org/adam/general/omg-ive-been-hacked.html</link>
		<comments>http://www.doctort.org/adam/general/omg-ive-been-hacked.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 23:21:55 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=366</guid>
		<description><![CDATA[Apologies to anyone who has logged into this blog in the last few days only to find a link-farming spam page. Seems that someone has managed to pull off a script injection on this site. I&#8217;ve removed the offending code but I still have no idea how they managed it. I&#8217;m investigating&#8230;
]]></description>
			<content:encoded><![CDATA[<p>Apologies to anyone who has logged into this blog in the last few days only to find a link-farming spam page. Seems that someone has managed to pull off a script injection on this site. I&#8217;ve removed the offending code but I still have no idea how they managed it. I&#8217;m investigating&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/omg-ive-been-hacked.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Halloween comes to Sydney</title>
		<link>http://www.doctort.org/adam/general/halloween-comes-to-sydney.html</link>
		<comments>http://www.doctort.org/adam/general/halloween-comes-to-sydney.html#comments</comments>
		<pubDate>Sat, 07 Nov 2009 10:05:10 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=357</guid>
		<description><![CDATA[Halloween usually isn&#8217;t very popular here in Australia but this year it sure was!
Residents of Matthews St, Davidson were inundated by hundreds of kids demanding sugar. My own kids were among the throng, I was surprised how many people were there.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doctort.org/adam/wp-content/uploads/2009/11/halloween09.jpg"><img class="size-medium wp-image-358 alignright" title="halloween09" src="http://www.doctort.org/adam/wp-content/uploads/2009/11/halloween09-300x225.jpg" alt="" width="300" height="225" align="right" /></a>Halloween usually isn&#8217;t very popular here in Australia but this year it sure was!<br />
Residents of <a href="http://maps.google.com.au/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=mathews+st+davidson+nsw&amp;sll=-33.830932,151.121052&amp;sspn=0.495665,0.551376&amp;ie=UTF8&amp;hq=&amp;hnear=Mathews+St,+Davidson+NSW+2085&amp;t=h&amp;z=17&amp;iwloc=A">Matthews St, Davidson</a> were inundated by hundreds of kids demanding sugar. My own kids were among the throng, I was surprised how many people were there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/halloween-comes-to-sydney.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You can Hire me</title>
		<link>http://www.doctort.org/adam/general/you-can-hire-me.html</link>
		<comments>http://www.doctort.org/adam/general/you-can-hire-me.html#comments</comments>
		<pubDate>Thu, 15 Oct 2009 05:11:54 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=351</guid>
		<description><![CDATA[I&#8217;m looking for a little bit of freelance work at the moment, if you are interested in someone to help you out with digital circuit design, embedded systems design or programming, application development or even web sites or server back end work, drop me a line at adam@siliconsparrow.com. I&#8217;ve put my Resumé online for you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m looking for a little bit of freelance work at the moment, if you are interested in someone to help you out with digital circuit design, embedded systems design or programming, application development or even web sites or server back end work, drop me a line at <a href="mailto:adam@siliconsparrow.com">adam@siliconsparrow.com</a>. I&#8217;ve put <a href="http://siliconsparrow.com/Adam_Pierce_Resume_2009.pdf">my Resumé</a> online for you to download if you are interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/you-can-hire-me.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Textapox is catching</title>
		<link>http://www.doctort.org/adam/general/textapox-is-catching.html</link>
		<comments>http://www.doctort.org/adam/general/textapox-is-catching.html#comments</comments>
		<pubDate>Sun, 20 Sep 2009 23:53:27 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=347</guid>
		<description><![CDATA[Look out for this new disease sweeping the children of the world. Symptoms include coloured spots on exposed areas of skin and uncontrollable giggling.

]]></description>
			<content:encoded><![CDATA[<p>Look out for this new disease sweeping the children of the world. Symptoms include coloured spots on exposed areas of skin and uncontrollable giggling.</p>
<p style="text-align: center;"><img class="size-full wp-image-348 aligncenter" title="textapox" src="http://www.doctort.org/adam/wp-content/uploads/2009/09/textapox.jpg" alt="" width="420" height="589" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/textapox-is-catching.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Spreadsheet Tomfoolery</title>
		<link>http://www.doctort.org/adam/general/more-spreadsheet-tomfoolery.html</link>
		<comments>http://www.doctort.org/adam/general/more-spreadsheet-tomfoolery.html#comments</comments>
		<pubDate>Thu, 03 Sep 2009 04:10:36 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=335</guid>
		<description><![CDATA[I&#8217;m still messing around with my bookkeeping. Here is another nifty formula for OpenOffice Calc. I have a list of revenue and the dates that revenue was received like so:


Date
Amount


10 Jul 2009
$1,080.00


18 Jul 2009
$144.45


30 Jul 2009
$2,248.40


2 Aug 2009
$1,000.00


5 Aug 2009
$522.30


I want to create a month-by-month summary of these figures. Here is the (rather complex) formula [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still messing around with my bookkeeping. Here is another nifty formula for OpenOffice Calc. I have a list of revenue and the dates that revenue was received like so:</p>
<table border="1">
<tr>
<th>Date</th>
<th>Amount</th>
</tr>
<tr>
<td>10 Jul 2009</td>
<td>$1,080.00</td>
</tr>
<tr>
<td>18 Jul 2009</td>
<td>$144.45</td>
</tr>
<tr>
<td>30 Jul 2009</td>
<td>$2,248.40</td>
</tr>
<tr>
<td>2 Aug 2009</td>
<td>$1,000.00</td>
</tr>
<tr>
<td>5 Aug 2009</td>
<td>$522.30</td>
</tr>
</table>
<p>I want to create a month-by-month summary of these figures. Here is the (rather complex) formula to make that happen:</p>
<pre>=SUMPRODUCT(A1:A5&gt;=DATEVALUE(&quot;01 Jul 2009&quot;);A1:A5&lt;DATEVALUE(&quot;01 Aug 2009&quot;);B1:B5)</pre>
<p>That formula will give the total of all amounts for July. By repeating this for each month, you can get monthly summaries for the whole year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/more-spreadsheet-tomfoolery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metamorphosis</title>
		<link>http://www.doctort.org/adam/general/metamorphosis.html</link>
		<comments>http://www.doctort.org/adam/general/metamorphosis.html#comments</comments>
		<pubDate>Sun, 16 Aug 2009 12:18:39 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=332</guid>
		<description><![CDATA[
I realise I&#8217;ve been a bit dark lately with my blog with very minimal posting over the last few months. A lot of things have been changing around here. My wife and I have swapped roles. That&#8217;s right, I&#8217;m the housewife now and she has a full-time job.
I&#8217;m still doing some contract work here and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.doctort.org/adam/wp-content/uploads/2009/08/butterfly.png" alt="A picture of a butterfly" title="butterfly" width="500" height="199" class="size-full wp-image-333" /><br />
I realise I&#8217;ve been a bit dark lately with my blog with very minimal posting over the last few months. A lot of things have been changing around here. My wife and I have swapped roles. That&#8217;s right, I&#8217;m the housewife now and she has a full-time job.</p>
<p>I&#8217;m still doing some contract work here and there but am spending most of my time looking after the kids and doing housework. To be perfectly honest, I&#8217;m enjoying it. Its really nice to take a break from full-time work, the first time I have not been working flat-out in about twelve years.</p>
<p>So where to from here? While kids and housework keep me reasonably busy, I&#8217;m not the kind of guy who can just sit around. So I&#8217;m planning to create some products for sale. I&#8217;ve set up a new site called <a href="http://siliconsparrow.com/">siliconsparrow.com</a> where I will base my professional operations. I am excited about the possibilities.</p>
<p>Unfortunately it means this blog will become a bit neglected. I&#8217;ll only be posting personal and hobby stuff here, and perhaps more housewife-related stuff like recipies!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/metamorphosis.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TV addiction</title>
		<link>http://www.doctort.org/adam/general/tv-addiction.html</link>
		<comments>http://www.doctort.org/adam/general/tv-addiction.html#comments</comments>
		<pubDate>Mon, 04 May 2009 06:42:27 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=323</guid>
		<description><![CDATA[
One of the little rules in our house is that kids are not allowed to watch TV before school in the morning.
But these two are so addicted to the glow of a screen, they watch my screen saver and pretend it is a movie!
Sometimes they are quite amusing to watch, they come up with things [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doctort.org/adam/wp-content/uploads/2009/05/screensavertelly.jpeg"><img title="screensavertelly" src="http://www.doctort.org/adam/wp-content/uploads/2009/05/screensavertelly-300x225.jpg" alt="" width="300" height="225" align="right" /></a></p>
<p>One of the little rules in our house is that kids are not allowed to watch TV before school in the morning.</p>
<p>But these two are so addicted to the glow of a screen, they watch my screen saver and pretend it is a movie!</p>
<p>Sometimes they are quite amusing to watch, they come up with things like &#8220;Oooh, watch out little blob, that big blob is going to get you&#8221; or &#8220;That&#8217;s two cows dancing!&#8221;.</p>
<p>My screen saver is <a href="http://electricsheep.org/">Electric Sheep</a> by the way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/tv-addiction.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toshiba vs Dell &#8211; Cashback deals and Customer Service</title>
		<link>http://www.doctort.org/adam/general/toshiba-vs-dell-cashback-deals-and-customer-service.html</link>
		<comments>http://www.doctort.org/adam/general/toshiba-vs-dell-cashback-deals-and-customer-service.html#comments</comments>
		<pubDate>Mon, 13 Apr 2009 00:10:57 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=320</guid>
		<description><![CDATA[I&#8217;ve never done a good &#8216;ol consumer rant on this site so here we go. I&#8217;ll put my grumpy old man hat on&#8230;
A couple of months ago, it so happened that I bought a Toshiba laptop and a Dell screen in the same week. Both products offered a $100 cash-back deal. What happened next showed [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never done a good &#8216;ol consumer rant on this site so here we go. I&#8217;ll put my grumpy old man hat on&#8230;</p>
<p>A couple of months ago, it so happened that I bought a Toshiba laptop and a Dell screen in the same week. Both products offered a $100 cash-back deal. What happened next showed very dramatically the difference in attitude towards customers of these two companies.</p>
<h2><strong>How the Toshiba cash-back works<br />
</strong></h2>
<p>The cash-back cannot be claimed in the store, you need to go to Toshiba&#8217;s web site and fill in a form.</p>
<p>But there is no form on Toshiba&#8217;s web site. So I <strong>phoned </strong>Toshiba and after the usual phone menu maze and having to hold for quarter of an hour, the Toshiba representative told me I need to go to a <a href="http://www.isd.toshiba.com.au/">different web site</a>.</p>
<p>Next were <strong>several screens of web forms </strong>to fill in including all my personal details, the model number and serial number of the laptop, when I bought it, where I bought it, the address of the shop, the ABN number of the owner of the shop and more and more and more. So then could I submit my claim ? No. They require you to <strong>print out</strong> the forms and then <strong>photocopy</strong> the purchase receipt and <strong>write</strong> a note, put it in a <strong>paper envelope</strong> and <strong>go to the post office</strong> and post it!!  This all took me about two hours.</p>
<p>So Toshiba eliminate people who are not web-savvy, do not have a printer and a photocopier, cannot be bothered spending an hour filling out forms or cannot be bothered going to the post office.</p>
<p>I received my cash-back about <strong>6 weeks</strong> later in the form of a postal money order. I had to physically <strong>go to the bank </strong>and deposit it over the counter so you can add an extra hour to the total time spent by me to claim this money.</p>
<p>You can also add to that, another half an hour I spent writing a letter of complaint about all this to Toshiba. Did I receive so much as an acknowledgement that they received my letter ?  Nope.</p>
<p>From a business point of view I can understand why they do all this. They figure if they make claiming the cash back difficult they can save money because I bet that less than 30% of customers actually go through all that bother. If they sell 1000 laptops, they&#8217;ve just saved $70,000.</p>
<p>Of course, this comes at the expense of aggrivating their own customers who like me, will probably never buy another Toshiba product again. Can you put a dollar value on that kind of customer resentment ?</p>
<h2><strong>How the Dell cash-back works</strong></h2>
<p>Dell credited my VISA card with $100 <strong>the next day</strong>. No forms to fill in, I didn&#8217;t have to do anything. Dell want to keep their customers.</p>
<h2><strong>Summary</strong></h2>
<p>I know who I will choose next time I buy a laptop.</p>
<table border="1">
<tbody>
<tr>
<th>Company</th>
<th>Time I spent applying for the cashback</th>
<th>Time before I received the cashback</th>
</tr>
<tr>
<td><strong>Toshiba</strong></td>
<td>3 hours</td>
<td>6 weeks</td>
</tr>
<tr>
<td><strong>Dell</strong></td>
<td>0</td>
<td>1 day</td>
</tr>
</tbody>
</table>
<p><strong>UPDATE: </strong><a href="http://www.dilbert.com/strips/comic/2009-04-19/">This Dilbert cartoon</a> says it all&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/toshiba-vs-dell-cashback-deals-and-customer-service.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Slide Show is now open source</title>
		<link>http://www.doctort.org/adam/general/simple-slide-show-is-now-open-source.html</link>
		<comments>http://www.doctort.org/adam/general/simple-slide-show-is-now-open-source.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 12:00:39 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=299</guid>
		<description><![CDATA[I&#8217;ve taken that old Simple Slide Show program I wrote years ago and given it a bit of a brush-up. I also changed the licensing so it is open source.
As a bonus, I have added a new feature to allow you to customise the colour and font used in the image captions.
You could use the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://doctort.org/adam/product/slideshow/"><img src="http://www.doctort.org/adam/wp-content/uploads/2008/12/slideshow.jpeg" alt="" title="Simple Slideshow" width="156" height="115" class="alignright size-full wp-image-301" align="right" /></a>I&#8217;ve taken that old Simple Slide Show program I wrote years ago and given it a bit of a brush-up. I also changed the licensing so it is open source.</p>
<p>As a bonus, I have added a new feature to allow you to customise the colour and font used in the image captions.</p>
<p>You could use the source code from this to make your own more fully-featured slide show application, or just use it as example code for writing whatever. I hope you find it useful.</p>
<p><a href="http://doctort.org/adam/product/slideshow/">CLICK HERE</a> to go to the download page. It&#8217;s free!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/simple-slide-show-is-now-open-source.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linux is amazingly useful</title>
		<link>http://www.doctort.org/adam/general/linux-is-amazingly-useful.html</link>
		<comments>http://www.doctort.org/adam/general/linux-is-amazingly-useful.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 06:04:38 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=297</guid>
		<description><![CDATA[It&#8217;s incredible the things you can do in Linux. Here&#8217;s two amazing things I&#8217;ve done today:
Amazing thing #1
I had a corrupted disk and I wanted to run some recovery tools on it but to be safe, I wanted work with a copy of the corrupted disk. So I created a raw copy of the entire [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s incredible the things you can do in Linux. Here&#8217;s two amazing things I&#8217;ve done today:</p>
<p><strong>Amazing thing #1</strong></p>
<p>I had a corrupted disk and I wanted to run some recovery tools on it but to be safe, I wanted work with a copy of the corrupted disk. So I created a raw copy of the entire disk and piped it to a different machine which had enough storage:</p>
<pre>cat /dev/hda1 | netcat -q 1 192.168.0.15 9998</pre>
<p>That created a file of 1128GB in size &#8211; probably the single biggest file I&#8217;ve ever created. It took more than 12 hours to copy to the other machine!</p>
<p>Then I created a loopback device so the system could pretend the file was a real disk:</p>
<pre>losetup /dev/loop0 /home/adam/recovery.raw</pre>
<p>Then I ran xfs_repair on it and recovered all the files. In the old days I would have to physically install a second hard drive in the corrupted box &#8211; did I mention that I did all this remotely from off-site through an ssh session.</p>
<p><strong>Amazing thing #2</strong></p>
<p>I needed to find all the Makefiles for an older version of my projects and update them. This command searches through a bunch of folders for files which contain the string &#8220;1.6&#8243; and loads them all up in a text editor for me. It sure beats manually going through dozens of folders and eyeballing every file.</p>
<pre>find /usr/src -name Makefile | xargs grep -l "1.6" | xargs kate</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/linux-is-amazingly-useful.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Update on TwinHan remote for Mythbuntu 8.10</title>
		<link>http://www.doctort.org/adam/general/update-on-twinhan-remote-for-mythbuntu-810.html</link>
		<comments>http://www.doctort.org/adam/general/update-on-twinhan-remote-for-mythbuntu-810.html#comments</comments>
		<pubDate>Sat, 15 Nov 2008 13:08:37 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=281</guid>
		<description><![CDATA[I&#8217;ve just upgraded my HTPC to the new Mythbuntu 8.10. I must say that setup is a helluva lot easier than previous versions of Myth although I found my ATI card did not work at all and I had to exhume an ancient nVidia card from my parts box. And I had to hack the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.doctort.org/adam/wp-content/uploads/2008/11/twinhanremote.jpg" alt="twinhan remote" align="right" />I&#8217;ve just upgraded my HTPC to the new <a href="http://www.mythbuntu.org">Mythbuntu</a> 8.10. I must say that setup is a helluva lot easier than previous versions of Myth although I found my ATI card did not work at all and I had to exhume an ancient nVidia card from my parts box. And I had to hack the xorg.conf file to make the TV output work so the setup is not 100% seamless.</p>
<p>Anyway, onto the odd device, my TwinHan remote control. Setting this up is much easier under Mythbuntu 8.10. Here&#8217;s the step-by-step:</p>
<p><br clear="all" /></p>
<p><strong>Step 1 &#8211; Configure LIRC</strong></p>
<p>Plug the IR receiver into a USB port. Wait a moment for it to register and then type the following command:</p>
<pre>ls /dev/input/by-id</pre>
<p>It should produce output like this. This step is just to verify the correct device name for the remote.</p>
<pre>usb-Twinhan_Tech_Remote_Control_1111111-event-kbd
usb-Twinhan_Tech_Remote_Control_1111111-event-mouse
usb-Twinhan_Tech_Remote_Control_1111111-mouse</pre>
<p>Now edit the file <strong>/etc/lirc/hardware.conf</strong> and enter values for REMOTE_DRIVER and REMOTE_DEVICE:</p>
<pre>REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-kbd"</pre>
<p>Due to a bug in this version of Ubuntu, you will also need to run the following command:</p>
<pre>lshal | grep input.product</pre>
<p>It will spit out a few lines of text. Verify that it produces a line like this:</p>
<pre>  input.product = 'Twinhan Tech Remote Control'  (string)</pre>
<p>Then edit the file <strong>/usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi</strong> and make it read like so:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;deviceinfo version="0.2"&gt;
  &lt;device&gt;
     &lt;match key="info.product" contains_ncase="Twinhan Tech Remote Control"&gt;
        &lt;merge key="info.ignore" type="bool"&gt;true&lt;/merge&gt;
     &lt;/match&gt;
  &lt;/device&gt;
&lt;/deviceinfo&gt;</pre>
<p>Finally, download this file:</p>
<p><a href="http://www.doctort.org/adam/files/twinhan/lircd.conf">lircd.conf</a></p>
<p>and put it in <strong>/etc/lirc/</strong></p>
<p>At this stage, I had to reboot so that everything loaded properly. Once you have rebooted, you can test the remote control by typing:</p>
<pre>irw</pre>
<p>Now every time you press a key, you should see it printed on the screen. Press Ctrl-C when you are done.</p>
<p><strong>STEP 2 &#8211; Configure MythTV commands</strong></p>
<p>We are getting closer now. The next step is to set up a file called <strong>~/.lirc/mythtv</strong> which contains the mappings between the keys on the remote and the functions in MythTV. Once again, I have already prepared this file which you can download here:</p>
<p><a href="http://www.doctort.org/adam/files/twinhan/lircrc-mythtv">lircrc-mythtv</a></p>
<p>Rename this file to <strong>mythtv</strong> and move it to <strong>~/.lirc/</strong> Once that is done, restart MythTV. Here are the key mappings you will end up with:</p>
<table>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
<tr>
<td>REC</td>
<td>Record</td>
</tr>
<tr>
<td>TELETEXT</td>
<td>OSD</td>
</tr>
<tr>
<td>RECALL</td>
<td>MENU</td>
</tr>
<tr>
<td>PREVIEW</td>
<td>INFO</td>
</tr>
<tr>
<td>REW/FFWD</td>
<td>Forward/backward in MythMusic</td>
</tr>
<tr>
<td>CAPTURE</td>
<td>Previous playlist item in MythMusic</td>
</tr>
<tr>
<td>RECORDLIST</td>
<td>Next playlist item in MythMusic</td>
</tr>
</table>
<p><strong>STEP 3 &#8211; Configure MPlayer</strong></p>
<p>The final step is to configure the mapping between the remote and the commands in MPlayer. Since MPlayer is a separate program, it needs to be configured separately to MythTV. To configure it, we need another lircrc file but this time is has to be called <strong>~/.lirc/mplayer</strong>. Download it from here:</p>
<p><a href="/adam/files/twinhan/lircrc-mplayer">lircrc-mplayer</a></p>
<p>Rename it to <strong>mplayer</strong> and put it in <strong>~/.lirc/</strong> and that should be that! Here are the key mappings for MPlayer:</p>
<table>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
<tr>
<td>MUTE</td>
<td>Mute</td>
</tr>
<tr>
<td>VOL+/-</td>
<td>Adjust volume</td>
</tr>
<tr>
<td>CH+/-</td>
<td>Skip fwd/back 60 seconds</td>
</tr>
<tr>
<td>REW/FFWD</td>
<td>Skip fwd/back 10 seconds</td>
</tr>
<tr>
<td>PREVIEW</td>
<td>Show/hide subtitles</td>
</tr>
<tr>
<td>TELETEXT</td>
<td>Show/hide OSD</td>
</tr>
<tr>
<td>TAB</td>
<td>Cycle through audio tracks</td>
</tr>
</table>
<p>If you do not like the key mappings I have chosen, you may edit the files in ~/.lirc. The format should be fairly easy to follow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/update-on-twinhan-remote-for-mythbuntu-810.html/feed</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Baud rate converter website is up</title>
		<link>http://www.doctort.org/adam/general/baud-rate-converter-website-is-up.html</link>
		<comments>http://www.doctort.org/adam/general/baud-rate-converter-website-is-up.html#comments</comments>
		<pubDate>Wed, 22 Oct 2008 11:56:46 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=276</guid>
		<description><![CDATA[I&#8217;ve set up a simple website to hawk my RS232 Rate Converter. The product is now ready to sell. Hooray!
The address is http://serialgadget.com/
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.doctort.org/adam/wp-content/uploads/2008/10/serialgadgetcom.png" alt="www.serialgadget.com" align="right" />I&#8217;ve set up a simple website to hawk my RS232 Rate Converter. The product is now ready to sell. Hooray!</p>
<p>The address is <a href="http://serialgadget.com/">http://serialgadget.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/baud-rate-converter-website-is-up.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Currency Calculation in PHP</title>
		<link>http://www.doctort.org/adam/general/currency-calculation-in-php.html</link>
		<comments>http://www.doctort.org/adam/general/currency-calculation-in-php.html#comments</comments>
		<pubDate>Wed, 22 Oct 2008 11:03:07 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=272</guid>
		<description><![CDATA[Thanks to some help from Stack Overflow, the new and excellent Q&#38;A site for programmers, I have put together a PHP class which can perform a currency conversion using up to date exchange rates pulled live from Yahoo. Here is the code for y&#8217;all to share:

&#60;?php

// fx.php - PHP Code to convert currencies using Yahoo's [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to some help from <a href="http://stackoverflow.com/questions/181990/programmatically-access-currency-exchange-rates">Stack Overflow</a>, the new and excellent Q&amp;A site for programmers, I have put together a PHP class which can perform a currency conversion using up to date exchange rates pulled live from Yahoo. Here is the code for y&#8217;all to share:</p>
<pre>
&lt;?php

// fx.php - PHP Code to convert currencies using Yahoo's currency conversion service.
// by Adam Pierce &lt;adam@doctort.org&gt; 22-Oct-2008
// This code is public domain.

class ForeignExchange
{
	private $fxRate;

	public function __construct($currencyBase, $currencyForeign)
	{
		$url = 'http://download.finance.yahoo.com/d/quotes.csv?s='
			.$currencyBase .$currencyForeign .'=X&#038;f=l1';

		$c = curl_init($url);
		curl_setopt($c, CURLOPT_HEADER, 0);
		curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
		$this-&gt;fxRate = doubleval(curl_exec($c));
		curl_close($c);
	}

	public function toBase($amount)
	{
		if($this-&gt;fxRate == 0)
			return 0;

		return  $amount / $this-&gt;fxRate;
	}

	public function toForeign($amount)
	{
		if($this-&gt;fxRate == 0)
			return 0;

		return $amount * $this-&gt;fxRate;
	}
};

?&gt;
</pre>
<p>Because it creates an object, that object will remember the exchange rate so it doesn&#8217;t need to look up the rate again and again if you want to do multiple currency conversions on the same web page.</p>
<p><strong>Usage Example:</strong></p>
<pre>
&lt;?php

// Create an object to convert Australian Dollars to Euros.
    require 'fx.php';
    $fx = new ForeignExchange('AUD', 'EUR');

// This function formats a value with 2 decimal places.
    function fmtMoney($amount)
    {
        return sprintf('.%.2f', $amount);
    }

    $auPrice = 25.50;

    echo '&lt;p&gt;Your price is AU$'. fmtMoney($auPrice)
        .' which is approximately &amp;euro;'. fmtMoney($fx-&gt;toForeign($auPrice)) .'&lt;/p&gt;';
?&gt;
</pre>
<p>&#8230;enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/currency-calculation-in-php.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Elastic Tabstops by Nick Gravgaard</title>
		<link>http://www.doctort.org/adam/general/elastic-tabstops-by-nick-gravgaard.html</link>
		<comments>http://www.doctort.org/adam/general/elastic-tabstops-by-nick-gravgaard.html#comments</comments>
		<pubDate>Fri, 17 Oct 2008 07:55:05 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=266</guid>
		<description><![CDATA[I&#8217;ve just been playing with the Elastic Tabstops plugin by Nick Gravgaard. I really like it. I like my code to look neat so when I write a block of code like this:
   $custFirstName = $_REQUEST['cust_first_name'];
   $custLastName = $_REQUEST['cust_last_name'];
   $custEmail = $_REQUEST['cust_email'];
   $custAddr1 = $_REQUEST['cust_addr_1'];
   $custAddr2 = [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just been playing with the <a href="http://nickgravgaard.com/elastictabstops/">Elastic Tabstops plugin</a> by Nick Gravgaard. I really like it. I like my code to look neat so when I write a block of code like this:</p>
<pre>   $custFirstName = $_REQUEST['cust_first_name'];
   $custLastName = $_REQUEST['cust_last_name'];
   $custEmail = $_REQUEST['cust_email'];
   $custAddr1 = $_REQUEST['cust_addr_1'];
   $custAddr2 = $_REQUEST['cust_addr_2'];</pre>
<p>I always try to neaten it up by adding spaces like so:</p>
<pre>   $custFirstName = $_REQUEST['cust_first_name'];
   $custLastName  = $_REQUEST['cust_last_name'];
   $custEmail     = $_REQUEST['cust_email'];
   $custAddr1     = $_REQUEST['cust_addr_1'];
   $custAddr2     = $_REQUEST['cust_addr_2'];</pre>
<p>Which is a little fiddly but I always do it because like I said, I like my code to look neat.</p>
<p>But now I have a tool which does it automatically. I&#8217;m very happy.</p>
<p>It will even handle proportional fonts so I&#8217;ve been experimenting with the decadent pleasure of coding in more beautiful type faces and still having everything line up.</p>
<p>Unfortunately it is only for <a href="http://www.gnome.org/projects/gedit/">gedit</a> at this time (which is a fine text editor but just a text editor nevertheless). If this were available in <a href="http://www.eclipse.org/">Eclipse</a> or <a href="http://msdn.microsoft.com/en-au/vstudio/products/default.aspx">MS Dev Studio</a>, I&#8217;d be in heaven!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/elastic-tabstops-by-nick-gravgaard.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows vs Linux when Changing Motherboards</title>
		<link>http://www.doctort.org/adam/general/windows-vs-linux-when-changing-motherboards.html</link>
		<comments>http://www.doctort.org/adam/general/windows-vs-linux-when-changing-motherboards.html#comments</comments>
		<pubDate>Sun, 12 Oct 2008 10:30:44 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=258</guid>
		<description><![CDATA[Well, here&#8217;s an interesting little tidbit. My home box is dual boot with Windows XP SP2 and Linux Ubuntu 8.04. My motherboard has been playing up recently so I got myself a new one, a Gigabyte GA-G31M-S2L. This is a budget board with a pretty plain-vanilla collection of peripherals.
After installing the board I chose to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-259" title="My new motherboard" src="http://www.doctort.org/adam/wp-content/uploads/2008/10/ga-g31m-s2l.jpg" alt="My new motherboard" align="right" />Well, here&#8217;s an interesting little tidbit. My home box is dual boot with Windows XP SP2 and Linux Ubuntu 8.04. My motherboard has been playing up recently so I got myself a new one, a Gigabyte <a href="http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2693">GA-G31M-S2L</a>. This is a budget board with a pretty plain-vanilla collection of peripherals.</p>
<p>After installing the board I chose to boot up Ubuntu first. I thought I&#8217;d probably need to install some drivers for the onboard audio, video and Gigabit Ethernet but no, <strong>it just worked!</strong> I was amazed. It would seem the days are gone when getting new hardware to work under Linux was a massive chore. I was so stunned I had to write a blog post about it. Even 3D acceleration worked immediately, no mess, no fuss.</p>
<p>Then I tried booting into Windows. Ha ha haha ha. Did it work straight up. Did it hell! I had to spend an hour mucking about with loading drivers and rebooting a million times.</p>
<p>Nowdays we have many cross-platform applications such as <a href="http://www.openoffice.org/">Open Office</a>, <a href="http://www.gimp.org">GIMP</a>, <a href="http://www.mozilla.com/">Firefox</a> and so on. Add to this the increasing stability and simplicity of the Gnome desktop, Ubuntu is very much a serious competitor for Windows, not just some time in the future but <strong>right now</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/windows-vs-linux-when-changing-motherboards.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centering and Scaling an Image on a Web Page</title>
		<link>http://www.doctort.org/adam/general/centering-and-scaling-an-image-on-a-web-page.html</link>
		<comments>http://www.doctort.org/adam/general/centering-and-scaling-an-image-on-a-web-page.html#comments</comments>
		<pubDate>Fri, 03 Oct 2008 00:34:09 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=256</guid>
		<description><![CDATA[I want a web page which displays a single image. The image is to be scaled so it is as large as possible within the browser but without losing it&#8217;s aspect ratio.
I also want it to be centred (or centered if you are American).
After spending literally hours trying to do this with CSS and scads [...]]]></description>
			<content:encoded><![CDATA[<p>I want a web page which displays a single image. The image is to be scaled so it is as large as possible within the browser but without losing it&#8217;s aspect ratio.</p>
<p>I also want it to be centred (or centered if you are American).</p>
<p>After spending literally <strong>hours</strong> trying to do this with CSS and scads of nested div tags, I have decided it is not possible to do it this way. The alternative was to use Javascript to compute the size and position of the image.</p>
<p>Here is the final code which works on IE and Firefox:</p>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;script&gt;
function scaleAndCenter(id)
{
 img = document.getElementById(id);
 img.style.position = &quot;absolute&quot;;

 if(img.width / document.body.clientWidth &gt; img.height / document.body.clientHeight)
 {
  img.style.width = &quot;100%&quot;;
  img.style.top   = (document.body.clientHeight - img.height) / 2;
 }
 else
 {
  img.style.height = &quot;100%&quot;;
  img.style.left   = (document.body.clientWidth - img.width) / 2;
 }
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body style=&quot;margin: 0; background: black;&quot;&gt;
&lt;img id=&quot;image&quot; src=&quot;myimage.jpeg&quot; onload=&quot;scaleAndCenter(this.id)&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/centering-and-scaling-an-image-on-a-web-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bed Hair</title>
		<link>http://www.doctort.org/adam/general/bed-hair.html</link>
		<comments>http://www.doctort.org/adam/general/bed-hair.html#comments</comments>
		<pubDate>Sat, 20 Sep 2008 01:09:28 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=246</guid>
		<description><![CDATA[I&#8217;m not my best first thing in the morning. Some evil person has been taking pictures&#8230;
]]></description>
			<content:encoded><![CDATA[<p><img title="Adam with bed hair" src="http://www.doctort.org/adam/wp-content/uploads/2008/09/adamwithbedhair.jpg" alt="Adam with bed hair" width="360" height="408" align="right" />I&#8217;m not my best first thing in the morning. Some evil person has been taking pictures&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/bed-hair.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gravatar support</title>
		<link>http://www.doctort.org/adam/general/gravatar-support.html</link>
		<comments>http://www.doctort.org/adam/general/gravatar-support.html#comments</comments>
		<pubDate>Mon, 14 Jul 2008 00:54:46 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=231</guid>
		<description><![CDATA[ Just a quick note that this site now supports Gravatars. So if you make a comment here and are registered over at www.gravatar.com, your picture will appear next to your comment like magic!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doctort.org/adam/wp-content/uploads/2008/07/adamhatsmall.jpeg"><img class="alignnone size-medium wp-image-232" title="AdamAvatar1" src="http://www.doctort.org/adam/wp-content/uploads/2008/07/adamhatsmall.jpeg" alt="" width="60" height="60" /></a> Just a quick note that this site now supports Gravatars. So if you make a comment here and are registered over at <a href="http://www.gravatar.com/">www.gravatar.com</a>, your picture will appear next to your comment like magic!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/gravatar-support.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No more advertising</title>
		<link>http://www.doctort.org/adam/general/no-more-ads.html</link>
		<comments>http://www.doctort.org/adam/general/no-more-ads.html#comments</comments>
		<pubDate>Wed, 30 Apr 2008 10:36:27 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/?p=225</guid>
		<description><![CDATA[As you can see, I have removed all the Google ads from this blog.
This blog gets around 1000 page views per day and I&#8217;ve been running the ads for about a year and a half now. In all that time Google have not paid me anything. Not a cent! So they are gone.
]]></description>
			<content:encoded><![CDATA[<p>As you can see, I have removed all the Google ads from this blog.</p>
<p>This blog gets around 1000 page views per day and I&#8217;ve been running the ads for about a year and a half now. In all that time Google have not paid me anything. Not a cent! So they are gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/no-more-ads.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multicomp on Linux</title>
		<link>http://www.doctort.org/adam/general/multicomp-on-linux.html</link>
		<comments>http://www.doctort.org/adam/general/multicomp-on-linux.html#comments</comments>
		<pubDate>Thu, 17 Jan 2008 10:59:33 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.doctort.org/adam/general/multicomp-on-linux.html</guid>
		<description><![CDATA[Hey, Multicomp runs pretty good under Ubuntu using WINE!

]]></description>
			<content:encoded><![CDATA[<p>Hey, <a href="http://doctort.org/adam/product/multicomp/">Multicomp</a> runs pretty good under Ubuntu using WINE!</p>
<p><img src="http://www.doctort.org/adam/wp-content/uploads/2008/01/multicomp-on-linux.png" alt="multicomp-on-linux.png" align="middle" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doctort.org/adam/general/multicomp-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
