<?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>Ciaran&#039;s Random Writings &#187; CiaranG</title>
	<atom:link href="http://ciarang.com/posts/author/admin/feed" rel="self" type="application/rss+xml" />
	<link>http://ciarang.com</link>
	<description>Random things I&#039;ve written about stuff</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:46:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Snakes and Ladders</title>
		<link>http://ciarang.com/posts/snakes-and-ladders</link>
		<comments>http://ciarang.com/posts/snakes-and-ladders#comments</comments>
		<pubDate>Tue, 14 Oct 2008 12:50:41 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Nuts]]></category>

		<guid isPermaLink="false">http://ciarang.com/?p=512</guid>
		<description><![CDATA[I was amused to hear that even amidst a story about plummeting property prices and a stagnant housing market, the folks on the lunchtime BBC News show still can&#8217;t help referring to &#8220;getting on the property ladder&#8221;. How does this ladder work again? Borrow more than you can afford in order to pay for something [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/mohitmohit/1588980757/"><img src="http://ciarang.com/wp-content/uploads/2008/10/snakes2.jpg" alt="" title="Snakes and Ladders, photo by JustMohit" width="200" height="216" class="alignright size-full wp-image-517" /></a></p>
<p>I was amused to hear that even amidst a story about plummeting property prices and a stagnant housing market, the folks on the lunchtime BBC News show still can&#8217;t help referring to &#8220;getting on the property ladder&#8221;.</p>
<p>How does this ladder work again? Borrow more than you can afford in order to pay for something that will immediately be worth less than you now owe? And that&#8217;s if something you can&#8217;t actually sell has a value.</p>
<p>Don&#8217;t they recognise a snake when they see one?</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/snakes-and-ladders/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>240L</title>
		<link>http://ciarang.com/posts/240l</link>
		<comments>http://ciarang.com/posts/240l#comments</comments>
		<pubDate>Mon, 13 Oct 2008 11:12:35 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Nuts]]></category>

		<guid isPermaLink="false">http://ciarang.com/?p=471</guid>
		<description><![CDATA[Stand in front of our house on a sunny day and you&#8217;ll hear the clip clop of hooves, the sound of a tractor at work, and some very strange excerpts from cyclist&#8217;s shouted conversations as they pass by. You might even hear someone say &#8220;Can you believe that? He&#8217;s out there taking pictures of the [...]]]></description>
			<content:encoded><![CDATA[<p>Stand in front of our house on a sunny day and you&#8217;ll hear the clip clop of hooves, the sound of a tractor at work, and some very strange excerpts from cyclist&#8217;s shouted conversations as they pass by. You might even hear someone say &#8220;Can you believe that? He&#8217;s out there taking pictures of the bloody wheelie bin again!?&#8221;</p>
<p><img src="http://ciarang.com/wp-content/uploads/2008/10/240l.jpg" alt="" title="240L" width="499" height="89" class="aligncenter size-full wp-image-472" /></p>
<p>Luckily whoever would be saying that isn&#8217;t in the house, or they&#8217;d have something to say about me sitting here writing about it <a href="http://ciarang.com/posts/yes-noisy-bins">again</a>. So 240L, I assume, is the capacity of the bin and helpfully it&#8217;s there in braille too, which is only fair because the blind should obviously have as much access to useless information as anybody else.</p>
<p>However, the only really useful bit of information on a wheelie bin is not the capacity or <a href="http://ciarang.com/posts/yes-noisy-bins">how loud it is</a>, but the colour. We are lucky enough to only have two &#8211; black for stuff that goes to landfill, and green for stuff that they pretend to recycle, but actually goes to landfill. Some places have three or four, along with a strange assortment of bags and boxes that go out on the road on particular days. These are apparently policed by an army of stab-vest wearing hitlers who take great pleasure in issuing crippling fines to the elderly for accidentally putting a normal tea bag in the bin reserved for herbal tea bags. The proceeds of all these fines, after the hitlers&#8217; wages have been paid, are stashed away in Icelandic banks to pay for the local councillors&#8217; next &#8220;fact-finding mission&#8221; to Barcelona or Florida. Anyway, back to the bins themselves&#8230;</p>
<p>You would think then, that they might have put the colour on the bin in braille instead of the capacity, but no. If you&#8217;re blind, I guess you must go out to your bins and (by somehow managing to get your finger in the right place) discover that you have three identical bins, all with 240L capacity, but no clue as to which one to put your cardboard in.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/240l/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>APNG and Peas</title>
		<link>http://ciarang.com/posts/apng-and-peas</link>
		<comments>http://ciarang.com/posts/apng-and-peas#comments</comments>
		<pubDate>Fri, 10 Oct 2008 21:51:41 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Food and Drink]]></category>
		<category><![CDATA[Gardening]]></category>
		<category><![CDATA[Mia]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ciarang.com/?p=464</guid>
		<description><![CDATA[APNG is a backwards-compatible extension to the PNG format that handles animation &#8211; a modern day, less klunky equivalent of the much abused animated GIF. A pea is a vegetable. Or is it? I am saying no, the pod is a fruit, and the pea itself is a seed. Feel free to argue amongst yourselves. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://animatedpng.com/">APNG</a> is a backwards-compatible extension to the PNG format that handles animation &#8211; a modern day, less klunky equivalent of the much abused animated GIF. A pea is a vegetable. Or is it? I am saying no, the pod is a fruit, and the pea itself is a seed. Feel free to argue amongst yourselves.</p>
<p><img src="http://ciarang.com/wp-content/uploads/2008/10/peas.png" alt="A short film about peas" title="A short film about Peas, unless your browser is shite in which case it's a picture" width="400" height="300" class="size-full wp-image-465" /></p>
<p>The above won&#8217;t work if you&#8217;re using Internet Explorer (stop doing that), and possibly not if you&#8217;re one of those Apple types either, though I&#8217;m not sure.</p>
<p>Update: I&#8217;m told this actually crashes Aurora, Midori and Kazehakase. I can&#8217;t help but wonder if that&#8217;s exploitable.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/apng-and-peas/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>A Lick Of Paint</title>
		<link>http://ciarang.com/posts/paint</link>
		<comments>http://ciarang.com/posts/paint#comments</comments>
		<pubDate>Thu, 09 Oct 2008 19:44:56 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ciarang.com/?p=458</guid>
		<description><![CDATA[Regular visitors (I&#8217;m being a bit optimistic using the plural there) will notice that this site has been smartened up a bit. Here&#8217;s what&#8217;s changed: Switched to the Tarski WordPress theme. Very easy to do. A bit of customisation was required, but because of the way the theme has been built with hooks in place, [...]]]></description>
			<content:encoded><![CDATA[<p>Regular visitors (I&#8217;m being a bit optimistic using the plural there) will notice that this site has been smartened up a bit. Here&#8217;s what&#8217;s changed:</p>
<ol>
<li>Switched to the <a href="http://tarskitheme.com/">Tarski</a> WordPress theme. Very easy to do. A bit of customisation was required, but because of the way the theme has been built with hooks in place, I was able to create a plugin to do the things I needed instead of having to modify anything.</li>
<li>Dropped the &#8216;blog.&#8217; from the domain, although all old links should redirect nicely.</li>
<li>Integrated a <a href="http://gallery.menalto.com">Gallery</a> installation.</li>
</ol>
<p>The last part was the trickiest, and more importantly the most pointless, so that&#8217;s what I&#8217;m going to talk about&#8230;</p>
<p><span id="more-458"></span></p>
<p><a href="http://gallery.menalto.com">Gallery</a> (a.k.a. Gallery2) really is a superbly crafted bit of software. For anyone interested in such things, I&#8217;d strongly advise taking it for a test drive just to see the installation, admin, plugin and maintenance interface which I reckon is unrivaled amongst any of the usual PHP web apps. Admittedly I&#8217;ve done it many times before, but even so 10 minutes to have it installed and fully configured with a range of plugins is impressive.</p>
<p>What I&#8217;ve never done before is integrated it with WordPress, so that took a more than a little bit longer. Setting up the basics was easy enough:</p>
<ol>
<li>Install gallery to a subdirectory</li>
<li>Install the <a href="http://wordpress.org/extend/plugins/wpg2/">WPG2</a> plugin into WordPress</li>
<li>Install the <a href="http://www.wpg2next.com/" class="broken_link">WordpressEmbedded</a> theme into Gallery</li>
</ol>
<p>This setup gives you integrated user accounts between WordPress and Gallery, an auto-generated Gallery page in WordPress that gives access to the full gallery (see the Gallery link in the navbar at the top), and a few other bells and whistles like the &#8216;random image&#8217; widget in the sidebar.</p>
<p>The tricky part was getting things to look right. You might argue that I haven&#8217;t managed it yet, but it does at least look reasonably tidy, at least in my browser. If it looks gruesome in yours, please let me know. Most of the hassle involved poking around in the CSS with Firebug, scratching my head (CSS guru I am not) and eventually making the necessary changes. There are still quite a lot of things I want to do with the WordpressEmbedded theme to get it the way I want it, but since there is no real point to this in the first place, I&#8217;ll probably take my time over it.</p>
<p>The observant amongst you might notice that a lot of the images have Flickr URLs in their metadata. That&#8217;s because I initially sucked in all the content from my (soon to be deleted) Flickr account &#8211; another dead easy job thanks to <a href="http://gallery2flickr.sourceforge.net/">Gallery2Flickr</a>. This Gallery plugin actually allows two way bridging between your Gallery instance and Flickr, for multiple users, but I just needed it as a one off.</p>
<p>Anyway, much as I&#8217;d like to sit here all night writing a blog post about my blog, there must be more useful things I could be doing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/paint/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Technical Debt Tips</title>
		<link>http://ciarang.com/posts/more-technical-debt</link>
		<comments>http://ciarang.com/posts/more-technical-debt#comments</comments>
		<pubDate>Mon, 06 Oct 2008 13:53:22 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/?p=442</guid>
		<description><![CDATA[So you followed all my tips in the first installment, but you&#8217;re still worried that your code might be maintainable? Here are some more: Forced to fix a bug? Don&#8217;t worry, you can reintroduce it a couple of releases later, as long as you remembered not to add a regression test for it. If you [...]]]></description>
			<content:encoded><![CDATA[<p>So you followed all my tips in the <a href="http://ciarang.com/posts/how-to-incur-technical-debt/">first installment</a>, but you&#8217;re still worried that your code might be maintainable? Here are some more:</p>
<ol start="11">
<li>Forced to fix a bug? Don&#8217;t worry, you can reintroduce it a couple of releases later, as long as you remembered not to add a regression test for it.</li>
<li>If you must document code, don&#8217;t take the opportunity to explain WHY it&#8217;s doing what it&#8217;s doing. Just describe the obvious. Learn from the masters at Microsoft</a>:

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// Initialize the column to '0'</span>
ColumnToSort <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
<span style="color: #008080; font-style: italic;">// Initialize the sort order to 'none'</span>
OrderOfSort <span style="color: #008000;">=</span> SortOrder<span style="color: #008000;">.</span><span style="color: #0000FF;">None</span><span style="color: #008000;">;</span></pre></div></div>

<p>No, really, that&#8217;s not made up &#8211; <a href="http://support.microsoft.com/default.aspx/kb/319401">see for yourself</a>.</li>
<li>If you have to generate a lengthy SQL statement, avoid any kind of formatting of the code that might make it readable. Instead, cram it all on one line such that you can only see a small part of it at once.</li>
<li>Avoid unnecessary timezone calculations by living on the Greenwich Meridian and only testing your code when DST is not in effect. Or preferably not at all.</li>
<li>Threading is your friend. Find obscure ways to make sure your functions are not re-entrant. When reports of random failures come in from production environments, simply say you can&#8217;t reproduce them.</li>
<li>Carefully read any coding standards that apply to your project and commit them to memory &#8211; otherwise there is a risk you might comply with part of them by mistake.</li>
<li>A multidimensional array is a fine construct for storing your tabular data, but only if you refer to all your columns by numbers and don&#8217;t document them. Better still though, is a comma-separated list of pipe-delimited strings. For bonus points, use a delimiter that only rarely occurs in the actual data.</li>
<li>Use floating point numbers for your currency calculations.</li>
<li>Although cluttering up the code is normally a worthy cause, don&#8217;t waste your time validating user input. Rely on bug reports to find out the interesting effects of the &#8216;unexpected&#8217; things they entered.</li>
<li>Refactor. Because you feel like it.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/more-technical-debt/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Coop2BZR &#8211; a repository converter</title>
		<link>http://ciarang.com/posts/coop2bzr</link>
		<comments>http://ciarang.com/posts/coop2bzr#comments</comments>
		<pubDate>Mon, 29 Sep 2008 07:35:41 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/?p=428</guid>
		<description><![CDATA[This is a quick and dirty utility I put together for my own use, but maybe someone else will find it useful. It can take a project from a local Code Co-op installation and recreate the full history as a Bazaar repository. To use it you need Code Co-op installed, along with its command-line tools [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick and dirty utility I put together for my own use, but maybe someone else will find it useful. It can take a project from a local <a href="http://www.relisoft.com/co_op/index.htm">Code Co-op</a> installation and recreate the full history as a <a href="http://bazaar-vcs.org/">Bazaar</a> repository.</p>
<p><span id="more-428"></span></p>
<p><img class="aligncenter size-full wp-image-429" title="coop2bzr" src="http://ciarang.com/wp-content/uploads/2008/09/coop2bzr.png" alt="" width="444" height="339" /></p>
<p>To use it you need Code Co-op installed, along with its command-line tools which come as a separate installer. You also need Bazaar installed and in your path. Usage is simple &#8211; select a project from the dropdown list, enter the path to a new directory where you want the bzr repository created, and press the &#8216;Go&#8217; button.</p>
<h2>Getting It</h2>
<p>You can download the binary version from <a href="http://ciarang.com/stuff/Coop2BZR-1.0.zip">http://ciarang.com/stuff/Coop2BZR-1.0.zip</a>. The zip file contains a single exe file, which is all you need. If you want the source (C#), <em>bizarrely</em> it is hosted under git, and is here: <a href="http://projects.ciarang.com/p/Coop2BZR/">http://projects.ciarang.com/p/Coop2BZR/</a>.</p>
<h2>Background</h2>
<p><a href="http://www.relisoft.com">Reliable Software</a>&#8216;s Code Co-op is on the very short list of software I&#8217;ve been using for over a decade, and on another even shorter list of software that doesn&#8217;t get on my nerves on a regular basis. A distributed version control system (DVCS) long before such things were fashionable, there was a time when I would have said it was the best option available for source control. These days, for a small Windows-only development team it&#8217;s still an excellent choice, but version control systems have become a something of a commodity over the last few years and the best all-round choices (i.e. Git, Darcs, Bazaar, SVN, Mercurial) are open and cross-platform, the two main things Code Co-op is lacking.</p>
<p>Even so, the intention behind developing this is not so much migration as the need to deal with the following issues:</p>
<ul>
<li><strong>Backup</strong> &#8211; I have an awful lot of old project history in Code Co-op. For archival purposes, I don&#8217;t want it stored in a proprietary format that I can&#8217;t access in ten years time when I want to look at it.</li>
<li><strong>Cross-platform development</strong> &#8211; Some of my projects that started out in Code Co-op as Windows-only have become cross-platform. They do need migrating, at least until I can make this a two-way bridge.</li>
<li><strong>Blame</strong> &#8211; Oddly, Code Co-op lacks a &#8216;blame&#8217; feature. By exporting a project to a format that does have it, the necessary facilities can be accessed even though the project continues to be run in Code Co-op. I regularly spend longer figuring out the origin/history of a section of code than it took to write this whole utility, so was worth it for that alone.</li>
</ul>
<p>Another question might be why Bazaar? No particular reason. As well as Code Co-op, I actively use SVN, Darcs and Bazaar, and very occasionally Git and Mercurial. In fact, thinking back, the real reason was that out of the box, Bazaar will handle files being added to and removed from the local tree without any additional commands, which made coding this a bit easier. The point is it doesn&#8217;t really matter which, because once the repository is in an open format there are plenty of ways to convert it to one of the others.</p>
<p>As mentioned above I intend, sooner or later, to turn this into a two-way bridge &#8211; if you&#8217;re interested in that, watch this space.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/coop2bzr/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Laconica on Debian Etch with PostgreSQL</title>
		<link>http://ciarang.com/posts/laconica-etch-postgresql</link>
		<comments>http://ciarang.com/posts/laconica-etch-postgresql#comments</comments>
		<pubDate>Wed, 24 Sep 2008 15:54:55 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Laconica]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/?p=419</guid>
		<description><![CDATA[A quick guide to getting Laconica up and running on Debian Etch using PostgreSQL as the database. The starting point for all this is a clean install of the netinst version, with no additional software selected during the install. Everything here is done as the root user. If this all seems a bit long-winded, that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>A quick guide to getting <a href="http://laconi.ca" class="broken_link">Laconica</a> up and running on Debian Etch using PostgreSQL as the database. The starting point for all this is a clean install of the netinst version, with no additional software selected during the install. Everything here is done as the root user.</p>
<p>If this all seems a bit long-winded, that&#8217;s because it is, but I thought it was better to cover everything from a clean install. In theory you should be able to follow this to the letter and end up with a working Laconica. Corrections will be gratefully received.</p>
<p><span id="more-419"></span></p>
<p>We&#8217;re going to use some software from <em>backports</em> to make life slightly easier, so the first thing to do is to add the following line to /etc/apt/sources.list:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">deb http://www.backports.org/debian etch-backports main contrib non-free</pre></div></div>

<p>&#8230;and do this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">apt-get update
apt-get install debian-backports-keyring</pre></div></div>

<p>Having done that, we can install some of the software we need:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">apt-get install git-core
apt-get install apache2
apt-get install libapache2-mod-php5 php5-cli php-pear php5-pgsql php5-curl libgmp3c2
apt-get -t etch-backports install postgresql-8.3
pear install channel://pear.php.net/Validate-0.8.1
pear install DB_DataObject
pear install Mail
pear install Net_SMTP
wget http://ciarang.com/stuff/php5-gmp_520-8etch11_i386.deb
dpkg -i php5-gmp_520-8etch11_i386.deb
rm php5-gmp_520-8etch11_i386.deb</pre></div></div>

<p>A word of warning on that .deb file for the PHP5 GMP support &#8211; you should really recompile php yourself to get that module. I should have done that as well, but instead I grabbed it from <a href="http://www.vortex-tech.com/2008/05/16/latest-php5-gmp-for-etch/">here</a>. If you&#8217;re more sensible, the compile instructions are linked from there too.</p>
<p>Anyway, whether you took the sensible option or not, we now need the Laconica source:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">cd /var/www
git clone git://gitorious.org/laconica/mainline.git laconica
cd laconica
cp htaccess.sample .htaccess
cp config.php.sample config.php</pre></div></div>

<p>The next job is to set up the database:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">su postgres
psql</pre></div></div>

<p>As always, I will use my luggage combination for the database password. You&#8217;ll see this referenced again later in these instructions, so each time use your luggage combination instead if for some strange reason it isn&#8217;t the same. So, at the psql prompt, which is where we are now:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">create user laconica with password '1234';
create database laconica with owner laconica encoding 'UTF8';
\q</pre></div></div>

<p>Now stop impersonating the postgres user, and create the database tables themselves as the laconica user:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">exit
psql -h localhost -U laconica -d laconica -f db/laconica_pg.sql</pre></div></div>

<p>Next, some editing in Laconica config.php file. These are just the settings you NEED to change &#8211; leave everything else alone until you have it up and running:</p>
<ul>
<li>['site']['path'] = &#8221;;</li>
<li>['site']['server'] = &#8216;your.domain.here&#8217;;</li>
<li>['site']['fancy] = true;</li>
<li>['db']['database'] = &#8216;pgsql://laconica:1234@localhost/laconica&#8217;;</li>
<li>['db']['ini_laconica'] = $config['db']['schema_location'].&#8217;/laconica.ini&#8217;;</li>
<li>['db']['quote_identifiers'] = true;</li>
<li>['db']['type'] = &#8216;pgsql&#8217;;</li>
</ul>
<p>Also add the following to the config to deal with the lack of a sys_get_temp_dir function in PHP 5.2.0:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/extlib/get_temp_dir.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>At the same time, change the RewriteBase directive at the top of .htaccess to read &#8220;RewriteBase /&#8221;.</p>
<p>Now create the file /etc/apache2/sites-available/laconica with contents like this, putting the correct domain for your laconica install in place of your.domain.here:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;VirtualHost *&gt;
        ServerName linton
        ServerAlias 192.168.0.21
&nbsp;
        DocumentRoot /var/www/laconica
        &lt;Directory /var/www/laconica&gt;
                AllowOverride All
                Order allow,deny
                allow from all
        &lt;/Directory&gt;
&nbsp;
        ErrorLog /var/log/apache2/error.log
&nbsp;
        LogLevel warn
&nbsp;
        CustomLog /var/log/apache2/access.log combined
&lt;/VirtualHost&gt;</pre></div></div>

<p>Enable the new site and the Apache modules we need, and restart Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">a2ensite laconica
a2enmod rewrite
a2enmod php5
apache2 <span style="color: #660033;">-k</span> restart</pre></div></div>

<p>All being well, if you visit your server in a browser you should be presented with a working (if ugly) Laconica install. Time to test and then start configuring.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/laconica-etch-postgresql/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>A busy weekend of bad parenting</title>
		<link>http://ciarang.com/posts/a-busy-weekend-of-bad-parenting</link>
		<comments>http://ciarang.com/posts/a-busy-weekend-of-bad-parenting#comments</comments>
		<pubDate>Tue, 23 Sep 2008 09:39:09 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Gardening]]></category>
		<category><![CDATA[Mia]]></category>
		<category><![CDATA[Weather]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/?p=403</guid>
		<description><![CDATA[For some reason last weekend seemed to be nicer than any we had over the so-called summer, so it was a perfect opportunity to get started on cutting the hedges. I have a crappy electric hedge trimmer that gets stuck on a hawthorn branch every 30 seconds, and I&#8217;ve also sliced through the cable three [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ciarang.com/wp-content/uploads/2008/09/scissors.jpg" alt="" title="scissors - don&#039;t run" width="250" height="333" class="alignright size-full wp-image-404" /></p>
<p>For some reason last weekend seemed to be nicer than any we had over the so-called summer, so it was a perfect opportunity to get started on cutting the hedges. I have a crappy electric hedge trimmer that gets stuck on a hawthorn branch every 30 seconds, and I&#8217;ve also sliced through the cable three times previously, so it&#8217;s all done by hand these days.</p>
<p>Mia had to help out of course, and yes that&#8217;s her pictured right, two years old and up a wobbly stepladder with a pair of scissors. And yes, that&#8217;s a plaster on her finger, but she didn&#8217;t do it with the scissors &#8211; that was the day before with the kitchen knife. I guess that when Mia gets to the age where she can use the internet, she might read this blog and then head on over to Wikipedia to find that most other children have ten whole fingers. If so, Mia, however many fingers you have now, that&#8217;s how many you were born with and I can produce photoshopped evidence if necessary.</p>
<p><img src="http://ciarang.com/wp-content/uploads/2008/09/orange.jpg" alt="" title="orange" width="200" height="267" class="alignleft size-full wp-image-408" /></p>
<p>More seriously, I don&#8217;t advocate that anyone lets their toddlers use knives and scissors or climb ladders. On the other hand, I don&#8217;t recommend that anyone tries to tell me what my toddler should and shouldn&#8217;t do when under my close supervision.</p>
<p>Another weekend task was rot-proofing the chicken house, slightly too late but better that than never. Unfortunately, when I bought the &#8216;stuff&#8217; I failed to notice something quite important and at no point during the transaction did the shopkeeper helpfully say &#8220;you do know that stuff is bright chuffing orange don&#8217;t you sir?&#8221; Therefore, due to the shopkeeper&#8217;s neglect, we have a glow-in-the-dark chicken house that people will probably use as a landmark when giving directions.</p>
<p><img src="http://ciarang.com/wp-content/uploads/2008/09/straightish.jpg" alt="" title="straight-ish" width="200" height="150" class="alignright size-full wp-image-413" /></p>
<p>Unfortunately there&#8217;s still quite a lot of hedge left to cut (I assume that people who call it trimming have a totally different kind of hedge) but in the meantime I can take pictures that only include the bits that are straight-ish and pretend it&#8217;s all like that.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/a-busy-weekend-of-bad-parenting/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spot The Odd One Out</title>
		<link>http://ciarang.com/posts/spot-the-odd-one-out</link>
		<comments>http://ciarang.com/posts/spot-the-odd-one-out#comments</comments>
		<pubDate>Fri, 19 Sep 2008 11:46:48 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Nuts]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/?p=397</guid>
		<description><![CDATA[What&#8217;s the difference between these?]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the difference between these?</p>
<p><a href="http://flickr.com/photos/stefz/4857076/"><img src="http://ciarang.com/wp-content/uploads/2008/09/mod.jpg" alt="" title="mod - click for original image by StefZ" width="350" height="262" class="aligncenter size-full wp-image-398" /></a></p>
<p><img src="http://ciarang.com/wp-content/uploads/2008/09/notmod.png" alt="" title="notmod" width="350" height="262" class="aligncenter size-full wp-image-399" /></p>
<p><a href="http://flickr.com/photos/omino71/2338755310/"><img src="http://ciarang.com/wp-content/uploads/2008/09/vespa.jpg" alt="" title="vespa - click for original image by omino71" width="350" height="262" class="aligncenter size-full wp-image-400" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/spot-the-odd-one-out/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Things that go b0rk in the night</title>
		<link>http://ciarang.com/posts/things-that-go-b0rk-in-the-night</link>
		<comments>http://ciarang.com/posts/things-that-go-b0rk-in-the-night#comments</comments>
		<pubDate>Thu, 18 Sep 2008 19:51:32 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/?p=389</guid>
		<description><![CDATA[A sorry and tedious tale of hardware failures in a world where technology and frozen peas collide. I got up this morning (or rather I was dragged up by Mia, as usual, at an ungodly hour) and the first thing I noticed as I wandered past my office on the way to the bathroom was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ciarang.com/wp-content/uploads/2008/09/deathstar.png"><img src="http://ciarang.com/wp-content/uploads/2008/09/deathstar.png" alt="Deathstar" title="A Deathstar" width="259" height="196" class="alignright size-full wp-image-392" /></a></p>
<p><em>A sorry and tedious tale of hardware failures in a world where technology and frozen peas collide.</em></p>
<p>I got up this morning (or rather I was dragged up by Mia, as usual, at an ungodly hour) and the first thing I noticed as I wandered past my office on the way to the bathroom was a horrible silence where the happy whirring and grinding of a dust-filled fans and creaky old hard drives should have been.</p>
<p><span id="more-389"></span></p>
<p>An inspection over breakfast revealed that the power supply in one of the office PCs was dead. No big deal, especially since it had been running 24/7 for 8 years, so I pulled one out of a less important machine, stuck it in and turned on the power. Nothing happened. A whole lot of tinkering (me plugging and unplugging things and cursing, Mia dripping porridge on the motherboard) later, it turned out that it would only power up if the power was disconnected from one of the drives. Either the power supply had blown and fried the drive&#8217;s on board electronics, or vice versa. Whichever way round it happened, add a totally dead drive to the casualty list.</p>
<p>The dead drive was the boot drive, and the other two were full. More cannibalism &#8211; the same less important machine had a spare-ish drive in, so I pulled that out and to my horror saw the last word I wanted to see on the label &#8211; Deskstar, a.k.a. Deathstar. I thought the last of these had already died (I think I&#8217;ve suffered at the hands of 10-ish). I pondered on whether it was even worth the effort of installing an OS on it, but decided I needed the machine back up and running straight away so I put the drive in and powered up again.</p>
<p>The noise that came next will be a familiar one to anyone who has ever had encounters with a Deathstar. Kind of a thwarp-thwarp-thwarp noise, but more sinister. The noise means you&#8217;ve lost your data, unless you&#8217;re prepared to go through a fortnight long routine of freezing the drive overnight (in an airtight container please), powering it up with some frozen peas (dry/airtight again) on top and frantically copying off data until it starts thwarping again and has to go back to the freezer.</p>
<p>I&#8217;ve seen the freezer trick put down as an urban myth before, but for particular kinds of drive failure and specifically the classic Deathstar one, I guarantee it works. Not as well, from an efficiency perspective, as having backups, but the end result is the same. Anyway, I didn&#8217;t want the data off the drive, I just wanted it working which it suddenly, at the one moment I needed it, wasn&#8217;t.</p>
<p>While I&#8217;m talking about the Deathstar, or Deskstar if you insist, be aware that it has a little cousin, the Travelstar. Now I suppose this is purely anecdotal, but being the sort of person that people come crying to with tales of &#8220;my laptop&#8217;s bust&#8221; it&#8217;s the sum of a significant number of identical anecdotes, in each of which the poorly laptop is put on the operating table and out comes a thwarping Travelstar. My personal (call off those lawyers) view on the subject is this: do not touch an AnythingStar with a bargepole. I wouldn&#8217;t even store my spam on one.</p>
<p>Plan C then. I booted from CD using the fabulous <a href="http://trinityhome.org/Home/index.php?wpid=1&#038;front_id=12">Trinity Rescue Kit</a> (never go anywhere without a TRK CD) and managed to find a old and forgotten swap partition on one of the machine&#8217;s data drives. Small, but not too small for a temporary Linux install. A bit of makefs-ing and wget-ing and I had the partition formatted and the Ubuntu network install kernel in place. The relevant files live <a href="http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/ubuntu-installer/i386/">here</a> for future reference &#8211; you just need &#8216;linux&#8217; and &#8216;initrd.gz&#8217; putting in /boot to avoid the whole download and burn ISO nonsense.</p>
<p>The only thing that wouldn&#8217;t work was GRUB, which steadfastly refused to install itself to the partition from the native TRK environment no matter what I tried, and I couldn&#8217;t manage to build a GRUB boot disk from there either. Out with another old faithful, the <a href="http://rescup.winbuilder.net/bootdisk/">All In One Boot Floppy</a>. Running from that, GRUB worked and booted straight into the Ubuntu installer and the machine was back up and running not long after, albeit with a lot less storage than before.</p>
<p>So, final scores: two dead drives, one dead power supply. Data lost: none, apart from a bunch of redundant backups and a load of virtual machine images that are quicker to rebuild than to back up. Moral of the &#8216;story&#8217; &#8211; there isn&#8217;t one really. In keeping with a common theme here, you&#8217;ve wasted your time if you&#8217;ve read this far, but hopefully you will have at least been reminded about backups. Don&#8217;t be one of those people who brings me their dead Travelstar and makes me tell them they&#8217;ve lost all their family photos for the last two years and several months of work.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/things-that-go-b0rk-in-the-night/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

