<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Pet Pixels - Techie</title>
    <link>http://marcus.bointon.com/</link>
    <description>Skiing, Baking, PHP, Music, in variable order</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:marcusblog@bointon.com" />
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <pubDate>Mon, 07 Dec 2009 03:09:45 GMT</pubDate>

    <image>
        <url>http://marcus.bointon.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Pet Pixels - Techie - Skiing, Baking, PHP, Music, in variable order</title>
        <link>http://marcus.bointon.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Basic Linux-HA heartbeat and pound config</title>
    <link>http://marcus.bointon.com/archives/90-Basic-Linux-HA-heartbeat-and-pound-config.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/90-Basic-Linux-HA-heartbeat-and-pound-config.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=90</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=90</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve had trouble in the past setting up &lt;a href=&quot;http://www.linux-ha.org/&quot;&gt;Linux-HA&lt;/a&gt; a.k.a heartbeat to create a redundant front-end for a web service. The HA documentation is quite thorough and detailed, but it&#039;s lacking realistic examples to get a working system up and running. This is a quick guide to creating a 2-way cluster with one or more floating IP addresses and automatic failover on &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; 9.04. I also include a quick config for &lt;a href=&quot;http://www.apsis.ch/pound/&quot;&gt;pound&lt;/a&gt;, a reverse proxy / load balancer.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/90-Basic-Linux-HA-heartbeat-and-pound-config.html#extended&quot;&gt;Continue reading &quot;Basic Linux-HA heartbeat and pound config&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 02 Dec 2009 17:05:36 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/90-guid.html</guid>
    <category>failover</category>
<category>heartbeat</category>
<category>ip</category>
<category>linux</category>
<category>load balancer</category>
<category>pound</category>
<category>redundancy</category>
<category>scalability</category>
<category>ubuntu</category>

</item>
<item>
    <title>MySQL backups with Percona's XtraBackup</title>
    <link>http://marcus.bointon.com/archives/87-MySQL-backups-with-Perconas-XtraBackup.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/87-MySQL-backups-with-Perconas-XtraBackup.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=87</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=87</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    MySQL backup is sometimes very hard to do effectively. MySQL provides &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/backup.html&quot; title=&quot;MySQL backup docs&quot;&gt;various options for backup&lt;/a&gt;, but many of them are simply unsuitable for large systems, particularly if they need to remain active during backups. &lt;a href=&quot;http://www.percona.com/&quot;&gt;Percona&#039;s&lt;/a&gt; &lt;a href=&quot;https://launchpad.net/percona-xtrabackup/&quot;&gt;XtraBackup&lt;/a&gt; is an open-source clone of InnoBase&#039;s &lt;a href=&quot;http://www.innodb.com/products/hot-backup/&quot;&gt;InnoDB Hot Backup&lt;/a&gt; utility. So what makes XtraBackup a better solution, and how does it work?
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; on December 10th 2009, &lt;a href=&quot;http://www.mysqlperformanceblog.com/2009/12/09/xtrabackup-1-0/&quot;&gt;Percona released Xtrabackup 1.0&lt;/a&gt;.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/87-MySQL-backups-with-Perconas-XtraBackup.html#extended&quot;&gt;Continue reading &quot;MySQL backups with Percona&#039;s XtraBackup&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 11 Sep 2009 12:18:00 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/87-guid.html</guid>
    <category>backup</category>
<category>innodb</category>
<category>mysql</category>
<category>percona</category>
<category>xtrabackup</category>

</item>
<item>
    <title>Google Charts API Simple and Extended Encoders in PHP</title>
    <link>http://marcus.bointon.com/archives/88-Google-Charts-API-Simple-and-Extended-Encoders-in-PHP.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/88-Google-Charts-API-Simple-and-Extended-Encoders-in-PHP.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=88</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=88</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    Google&#039;s charting API has been around for quite a while now, but I&#039;ve only just needed to actually look at it. It became immediately obvious that I needed a PHP encoding function, so off to google I went. Though I found several implementations, they were all incomplete or deficient in one way or another (and it didn&#039;t help that there was an error in google&#039;s extended encoding docs), so I&#039;ve written my own based on several different ones. Both simple and extended encoders support automatic scaling, inflated maximum and lower-bound truncation, so you can pretty much stuff whatever data you like in, with no particular regard for pre-scaling and you&#039;ll get a usable result out. They have an identical interface, so you can use either encoding interchangeably according to the output resolution you need (contrary to popular belief, the encoding to use has very little to do with the range of values you need to graph). By default, the full range of possible values is used as it just seems silly not to. I deliberately omit the &#039;s:&#039; and &#039;e:&#039; prefixes so that you can call these functions for multiple data series, and I include a function that does just that. You still need to generate your own URLs and other formatting, but that&#039;s a different problem. Read on for the code... &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/88-Google-Charts-API-Simple-and-Extended-Encoders-in-PHP.html#extended&quot;&gt;Continue reading &quot;Google Charts API Simple and Extended Encoders in PHP&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 14 Aug 2009 09:34:27 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/88-guid.html</guid>
    <category>api</category>
<category>charts</category>
<category>encoding</category>
<category>google</category>
<category>php</category>

</item>
<item>
    <title>Subversion 1.5 repository upgrade on SourceForge</title>
    <link>http://marcus.bointon.com/archives/85-Subversion-1.5-repository-upgrade-on-SourceForge.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/85-Subversion-1.5-repository-upgrade-on-SourceForge.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=85</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=85</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I&#039;ve just had a slightly tricky time upgrading a subversion repository on sourceforge. They have recently added support for subversion 1.5 at the server end. 1.5 brings major new features for merging, but as it&#039;s not backward compatible with older subversion clients, the upgrade is not done automatically. SF have also done a major rearrangement of their documentation while transferring everything to Trac, and it&#039;s not always easy to get the right info. Normally to upgrade a subversion repo, you just run the &#039;svnadmin upgrade /path/to/repo&#039;, however, it&#039;s not quite so simple on sourceforge as you don&#039;t have direct access to the repo, and &lt;a href=&quot;http://apps.sourceforge.net/trac/sourceforge/wiki/Subversion%20import%20instructions&quot;&gt;the instructions&lt;/a&gt; they give are &lt;a href=&quot;http://apps.sourceforge.net/trac/sourceforge/ticket/467&quot;&gt;slightly wrong at the time of writing&lt;/a&gt;. You&#039;re likely to get an error like this (it&#039;s not obvious that this is a fatal error) when you reload a dump file:
&lt;blockquote&gt;svnadmin: File already exists: filesystem &#039;/svnroot/projectname/db&#039;, transaction &#039;443-0&#039;, path &#039;tags&#039;
     \* adding path : tags ...&lt;/blockquote&gt;
This is because load is intended to add files to an existing repo, not to replace those that are already there, so you need to wipe the repo and start from scratch.

So, here is a working command sequence that needs to be run from a project login shell on sourceforge (it applies to the project you&#039;re logged in through, substitute your project&#039;s name for projectname):
&lt;blockquote&gt;adminrepo --checkout svn
svnadmin dump /svnroot/projectname &gt; svn.dump
rm -rf /svnroot/projectname/\*
svnadmin create /svnroot/projectname
svnadmin load /svnroot/projectname &lt; svn.dump
adminrepo --save svn&lt;/blockquote&gt;
Yes, you do need to delete the whole thing and re-import it, but it&#039;s quick and easy, and you have a backup in the dump file you take at the start. After the upgrade, make sure you get a new checkout of your project to ensure that you&#039;re using 1.5 all the way through. Now you&#039;ll find that commands like &#039;svn merge --reintegrate&#039; work. 
    </content:encoded>

    <pubDate>Tue, 05 May 2009 11:19:04 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/85-guid.html</guid>
    <category>project</category>
<category>repository</category>
<category>shell</category>
<category>sourceforge</category>
<category>subversion</category>
<category>upgrade</category>

</item>
<item>
    <title>Speaker &amp; room calibration</title>
    <link>http://marcus.bointon.com/archives/84-Speaker-room-calibration.html</link>
            <category>Music</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/84-Speaker-room-calibration.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=84</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I was lucky enough to pick up a &lt;a href=&quot;http://www.behringer.com/EN/Products/DSP8024.aspx&quot;&gt;Behringer Ultracurve Pro DSP8024&lt;/a&gt; for a mere £50 on eBay recently. It turned out to have a buggy OS version (1.2), and Behringer very kindly sent me a replacement EPROM with a new 1.3 OS on it, which works just fine. I now have it installed between my Soundcraft mixer and my Wharfedale active monitors. I used its &quot;Auto-Q&quot; calibration routine and put up with some quite loud pink noise to calculate a room correction curve. Because it knows the spectrum it&#039;s generating, it assumes that what it gets back has been altered by the combination of speakers, room and microphone, so it can calculate an eq map to compensate for it. It&#039;s quite fun to watch as it has a nice big LCD screen to display the 31 1/3 octave bands - the initial spectrum is fairly peaky, but as it iteratively applies corrections you see (and hear) it flattening out. It&#039;s also very obvious that my monitors don&#039;t put out much below 50Hz (it analyses down to 20Hz), but that&#039;s to be expected from a moderately sized box with a 6.5&quot; driver. The results are really pretty good, sounds lovely and smooth, but the real surprise is when you&#039;ve been listening to it for a while and you switch out the EQ - it&#039;s really quite a shock to hear the uncorrected version. Lots of purists don&#039;t like room correction by EQ, saying it&#039;s better to fix the room in the first place, and also that EQ calculated like this is highly dependent on the listening position (which it is). I have a lots of bookshelves facing my speakers; they make fantastic diffusers, and I have some &lt;a href=&quot;http://www.universal-acoustics.com/&quot;&gt;Universal Acoustics&lt;/a&gt; absorber tiles on the sloping ceiling above my listening position. The longest room mode will be fairly undamped (I&#039;m not about to start hanging duvets around the walls!), but the resulting EQ is below 6db in either direction across the whole range - I&#039;ve heard of rooms with 24db peaks! Anyway, after all that, it sounds lovely, and I&#039;m happy! 
    </content:encoded>

    <pubDate>Fri, 20 Mar 2009 18:45:54 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/84-guid.html</guid>
    <category>acoustics</category>
<category>behringer</category>
<category>dsp8024</category>
<category>eq</category>
<category>music</category>
<category>tiles</category>
<category>universal acoustics</category>

</item>
<item>
    <title>The web developer's holy vhost trinity</title>
    <link>http://marcus.bointon.com/archives/83-The-web-developers-holy-vhost-trinity.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/83-The-web-developers-holy-vhost-trinity.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=83</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=83</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    When you&#039;re developing web stuff, working with projects in path names (i.e. not at the top level of a domain) can be difficult (gets in the way of absolute links, rewrite rules etc), so you often need to set up a local apache virtual host, stick an entry in DNS and create an SSL certificate before you can get on with the serious business of doing some real work. This can get to be a drag when you do it a lot, but there is an extremely elegant solution that means you&#039;ll never have to do it again...
 &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/83-The-web-developers-holy-vhost-trinity.html#extended&quot;&gt;Continue reading &quot;The web developer&#039;s holy vhost trinity&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 20 Mar 2009 12:11:12 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/83-guid.html</guid>
    <category>apache</category>
<category>developer</category>
<category>php</category>
<category>ssl</category>
<category>web</category>
<category>wildcard</category>

</item>
<item>
    <title>Changing MacBook Bezel</title>
    <link>http://marcus.bointon.com/archives/81-Changing-MacBook-Bezel.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/81-Changing-MacBook-Bezel.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=81</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=81</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I recently had cause to change the bezel on my rev A 13&quot; MacBook.  If you follow &lt;a href=&quot;http://www.ifixit.com/Guide/Repair/MacBook-Core-Duo-Front-Bezel/306/1#top&quot;&gt;the guide&lt;/a&gt; on MacFixit, it is a long and complicated procedure, involving dismantling nearly everything. Luckily, most of it is unnecessary - it&#039;s really quite easy to simply remove the bezel without dismantling anything; just &lt;a href=&quot;http://www.ifixit.com/Guide/Repair/MacBook-Core-Duo-Front-Bezel/306/12#s1209&quot;&gt;jump straight to step 35&lt;/a&gt; and carry on from there. 
    </content:encoded>

    <pubDate>Mon, 09 Mar 2009 13:15:11 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/81-guid.html</guid>
    
</item>
<item>
    <title>Web Hooks, Callbacks and Distributed Observers</title>
    <link>http://marcus.bointon.com/archives/80-Web-Hooks,-Callbacks-and-Distributed-Observers.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/80-Web-Hooks,-Callbacks-and-Distributed-Observers.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=80</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=80</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    Someone at &lt;a href=&quot;http://www.amee.com/&quot;&gt;AMEE&lt;/a&gt; pointed out to me that there&#039;s been a &lt;a href=&quot;http://webhooks.pbwiki.com/&quot;&gt;flurry&lt;/a&gt; of &lt;a href=&quot;http://blog.webhooks.org/&quot;&gt;activity&lt;/a&gt; around so-called &quot;Web Hooks&quot; when I referred to the concept. This is quite heartening as I thought of this a couple of years ago and implemented this in &lt;a href=&quot;https://www.smartmessages.net/&quot;&gt;Smartmessages&lt;/a&gt; early last year! I call them callbacks, but the idea is the same - it&#039;s essentially a distributed observer pattern. I couldn&#039;t figure out why nobody seemed to understand what I was on about... When I get some interesting event (e.g. a message open, mailshot completion, clickthrough etc), I ping a user-supplied URL with the appropriate event data, pretty much the one-liner that Jeff alludes to. The reason we do it is that sync with external systems (usually CRM) is something that were always running into, and there seems to be no sensible, generic way of dealing with it other than this, so I&#039;m surprised it has not been discussed in this context before.
There&#039;s one downside as far as I can see - it is highly dependent on the receiver to be able to handle the event in a timely fashion. This isn&#039;t an issue if you&#039;re connecting say, Yahoo! to Google, but it could be a big problem if you connect Google to your Wordpress blog... My experience of CRM systems is that they are simply too slow to cope with the high rates of traffic that we are likely to generate, for example, if we point a stream of ~200 events per second at a CRM system, it will probably just bog down and fail (I&#039;m thinking of the SalesForce API here which typically takes 1-2 sec to deal with a single SOAP API call). Retrying will only make this worse. I have two solutions for this: limit events to those that don&#039;t happen so often (kind of lame!), or alternatively, use an outbound message queue to rate-limit the sending (&lt;a href=&quot;http://aws.amazon.com/sqs/&quot;&gt;Amazon SQS &lt;/a&gt;and &lt;a href=&quot;http://memcachedb.org/memcacheq/&quot;&gt;Memcacheq&lt;/a&gt; spring to mind). Queueing works, but you lose some of the real-time aspect. Ideally clients would implement their own incoming queue in order to allow them to process events at their leisure, but this is mostly beyond the vast majority of web authors (or at least those that host the CRM systems that we hear from!).
Anyway, it&#039;s nice to know that I&#039;m not completely barking... 
    </content:encoded>

    <pubDate>Wed, 04 Mar 2009 14:44:37 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/80-guid.html</guid>
    <category>callbacks</category>
<category>crm</category>
<category>php</category>
<category>smartmessages</category>
<category>web hooks</category>

</item>
<item>
    <title>Scalable irony</title>
    <link>http://marcus.bointon.com/archives/78-Scalable-irony.html</link>
            <category>PHP</category>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/78-Scalable-irony.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=78</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=78</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    &lt;a href=&quot;http://highscalability.com/scaling-digg-and-other-web-applications&quot;&gt;This article&lt;/a&gt; on highscalability.com is a really excellent rundown of some of the options available for scaling a site to the heights of Digg. Ironically enough, at the time of writing the highscalabilitycom web server shows this error:
&lt;blockquote&gt;Unable to connect to database server
The MySQL error was: User highscal_admin already has more than &#039;max_user_connections&#039; active connections. &lt;/blockquote&gt;I can point them at this really good article on how to avoid problems like this... oh, wait... 
    </content:encoded>

    <pubDate>Mon, 02 Mar 2009 15:52:13 +0000</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/78-guid.html</guid>
    
</item>
<item>
    <title>Hard Drive Story</title>
    <link>http://marcus.bointon.com/archives/73-Hard-Drive-Story.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/73-Hard-Drive-Story.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=73</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    &lt;!-- s9ymdb:27 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;110&quot; height=&quot;65&quot; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://marcus.bointon.com/uploads/trashedhd.serendipityThumb.jpg&quot; alt=&quot;&quot; /&gt; So my MacBook was just sitting on a desk, idle. It was showing a screen saver or something. I woke it up and was greeted with a spinning beachball of death. This seemed to be an unusually persistent hang, so I killed the power and rebooted. I get a flashing system folder, no OS found. I reboot from a Leopard DVD and run disk utility. My HD does not even appear on the SATA bus. Around this time I notice a very quiet repeated clicking coming from the HD and I get a bad feeling about the dreaded &quot;&lt;a href=&quot;http://en.wikipedia.org/wiki/Click_of_death&quot;&gt;click of death&lt;/a&gt;&quot;. I power off and reboot from an external drive, but still no sign of the internal one. It seems the drive is dead.
Now is the time to contemplate my backups. I have some recent enough Time Machine backups on an external drive, so I restore one of those onto the other external. That all works, but when I reboot into it and try to log in, I get an odd error about not being able to log in due to a FileVault problem, which I was indeed using. A bit of googling reveals the sad truth: Time Machine and FileVault do not play nicely together. Or more to the point, Time Machine just ignores everything protected by &#039;FailVault&#039;, that is to say if backs up everything except the bits that you actually want backed up. It turns out that it will back stuff up, but only if you log out. Hm. Logging out is for people that want to live without the instant-on we&#039;ve come to love from Apple, and don&#039;t mind waiting 5 minutes to for their 10 apps to launch on login, i.e. those that don&#039;t have laptops.
So I extract the internal HD and ship it off to a data recovery company. After a day or so I get the bad news:
&lt;blockquote&gt;We regret to inform you that we have tried our very best to recover data from the faulty Hard Disk Drive you sent to us, unfortunately we were unable to recover any data.
 
Please accept our apologies for not bringing our services to your satisfaction, despite the fact that from a technical point of view, the damaged inflicted on HDD is beyond repair and it is absolutely impossible to recover any data as the HDD had suffered from severe internal mechanical failure accompanied by media damage, therefore the extreme nature of the damage made it impossible to recover any data.
 
Despite the usage of different components to get the HDD to spin, the internals were too damaged to read any data from the HDD. The effect of the media damage is immediate on the magnetic information stored on the drive, jeopardising the stored data files and the logical structures.
 
You can view the scratched area of the hard drive platter in the attached picture, it is the thick dark ring you see running around the inner part of the platter.
&lt;/blockquote&gt;
I&#039;ve attached that very picture and you can see there is some fairly obvious mechanical damage to the drive - a great (for want of a better word) example of a &lt;a href=&quot;http://en.wikipedia.org/wiki/Head_crash&quot;&gt;head crash&lt;/a&gt;. The chances of a 50Gb encrypted volume file surviving that intact are pretty slim, as they say.
I&#039;m pretty surprised that a modern, state-of-the-art hard drive can suffer spontaneous catastrophic damage like this without having experienced any physical shock. For those that want to know (so you know what to avoid), the drive was a 160Gb Seagate Momentus 5400.3, a bit under 2 years old. It&#039;s still under guarantee, but a fat lot of use that is now.
I need to reconsider my backup and encryption options... 
    </content:encoded>

    <pubDate>Fri, 24 Oct 2008 15:24:43 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/73-guid.html</guid>
    
</item>
<item>
    <title>eBay's new page design</title>
    <link>http://marcus.bointon.com/archives/72-eBays-new-page-design.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/72-eBays-new-page-design.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=72</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=72</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I took a look at eBay&#039;s new page design, which they are currently previewing. Verdict: needs lots more work. &lt;br /&gt;&lt;a href=&quot;http://marcus.bointon.com/archives/72-eBays-new-page-design.html#extended&quot;&gt;Continue reading &quot;eBay&#039;s new page design&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 24 Sep 2008 11:40:28 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/72-guid.html</guid>
    <category>css</category>
<category>ebay</category>
<category>html</category>
<category>standards</category>

</item>
<item>
    <title>ClamAV broken version check</title>
    <link>http://marcus.bointon.com/archives/66-ClamAV-broken-version-check.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/66-ClamAV-broken-version-check.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=66</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=66</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    If you&#039;ve just built and installed the new version 0.94 of &lt;a href=&quot;http://clamav.org/&quot;&gt;ClamAV&lt;/a&gt; (because it reminded you that your current version was out of date), and you&#039;re using the experimental features, it exposes a rather dumb bug that results in these messages in your freshclam log:
&lt;blockquote&gt;@4000000048be74fd0687f57c Software version from DNS: 0.94
@4000000048be74fd0688245c WARNING: Your ClamAV installation is OUTDATED!
@4000000048be74fd06883014 WARNING: Local version: 0.94-exp Recommended version: 0.94&lt;/blockquote&gt;
Apparently ClamAV&#039;s version comparison is not terribly clever, and the &#039;new feature&#039; of marking experimental versions with &#039;-exp&#039; has tripped it up. I&#039;m sure there are multiple workarounds, but I changed this in shared/misc.c:
&lt;blockquote&gt;#ifdef CL_EXPERIMENTAL
/*#define EXP_VER &quot;-exp&quot;*/
#define EXP_VER
#else
#define EXP_VER
#endif&lt;/blockquote&gt;
as the EXP_VER string is what gets appended to the version number (apparently only for display purposes, but it does the trick). I then rebuilt it and now my log says:
&lt;blockquote&gt;@4000000048be848926da098c Software version from DNS: 0.94&lt;/blockquote&gt;
Yay - no error! 
    </content:encoded>

    <pubDate>Wed, 03 Sep 2008 13:40:20 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/66-guid.html</guid>
    
</item>
<item>
    <title>Safari 4 preview</title>
    <link>http://marcus.bointon.com/archives/64-Safari-4-preview.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/64-Safari-4-preview.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=64</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=64</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    I just grabbed the new update to the Safari 4 preview, and I have to say it&#039;s very zippy indeed. &lt;a href=&quot;http://webkit.org/perf/sunspider-0.9/sunspider-results.html?%7B%223d-cube%22:%5B124,100,97,97,96%5D,%223d-morph%22:%5B84,81,80,79,79%5D,%223d-raytrace%22:%5B93,83,82,83,83%5D,%22access-binary-trees%22:%5B42,42,43,40,40%5D,%22access-fannkuch%22:%5B47,46,47,46,47%5D,%22access-nbody%22:%5B179,160,159,160,160%5D,%22access-nsieve%22:%5B20,20,19,20,20%5D,%22bitops-3bit-bits-in-byte%22:%5B22,21,20,21,20%5D,%22bitops-bits-in-byte%22:%5B25,24,24,26,24%5D,%22bitops-bitwise-and%22:%5B44,44,44,50,43%5D,%22bitops-nsieve-bits%22:%5B51,57,52,57,51%5D,%22controlflow-recursive%22:%5B17,17,17,17,16%5D,%22crypto-aes%22:%5B28,26,27,26,28%5D,%22crypto-md5%22:%5B39,39,38,41,39%5D,%22crypto-sha1%22:%5B39,38,38,40,38%5D,%22date-format-tofte%22:%5B97,96,96,97,95%5D,%22date-format-xparb%22:%5B67,72,66,68,67%5D,%22math-cordic%22:%5B67,74,75,67,67%5D,%22math-partial-sums%22:%5B113,123,121,121,109%5D,%22math-spectral-norm%22:%5B46,45,48,48,45%5D,%22regexp-dna%22:%5B178,178,196,178,176%5D,%22string-base64%22:%5B61,61,64,63,63%5D,%22string-fasta%22:%5B77,85,76,77,77%5D,%22string-tagcloud%22:%5B94,99,95,106,98%5D,%22string-unpack-code%22:%5B106,115,104,106,109%5D,%22string-validate-input%22:%5B71,67,67,68,71%5D%7D&quot;&gt;I ran SunSpider benchmarks&lt;/a&gt; on it and FireFox 3.0.1 on my Mac Pro. Safari 4 is on average 75% faster, but has many results that are in the 200 - 500% range.

This is only measuring javascript performance of course, but that, plus whatever other changes are in S4, translates to incredible speed in daily use. I use the SafariStand extension to remember my open tabs, and I can reopen about 40 tabs in 8 windows in about 3 seconds, including all their content! FF 3 was a huge improvement over 2, but Safari 4 is a different league. This is only a preview, so it will probably get faster still by release.

The integration of the JS debugger is very elegant (Drosera has been rolled in), but I&#039;m still looking forward to the appearance of FireBug for Safari, which someone is doing as a Google SoC project (S4 adds some FireBug hooks too).

All the new CSS funkiness from recent webkit nightlies is there too, and I suspect many an iPhone and widget developer is drooling over them... 
    </content:encoded>

    <pubDate>Tue, 26 Aug 2008 15:04:52 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/64-guid.html</guid>
    
</item>
<item>
    <title>Apache mod_rewrite bug still lurks</title>
    <link>http://marcus.bointon.com/archives/63-Apache-mod_rewrite-bug-still-lurks.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/63-Apache-mod_rewrite-bug-still-lurks.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=63</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    There&#039;s this &lt;a href=&quot;https://issues.apache.org/bugzilla/show_bug.cgi?id=34602&quot;&gt;enormous apache mod_rewrite bug&lt;/a&gt; that I ran into back in 2005, and to my dismay, it&#039;s still there. Long-standing bugs are usually small edge cases that don&#039;t affect many people, but this one is a monster that I suspects pretty much everyone that&#039;s using mod_rewrite, and they&#039;ve just been lucky in avoiding it. The basic issue is this: if you match params that require URL encoding to be safe, mod_rewrite will not rewrite the back-reference (that&#039;s $1 below) correctly. So take this very simple redirect:

RewriteRule ^(.*)$ index.php?show=$1 [R]

so you hit http://www.example.com/a%2Fb and mod_rewrite neatly rewrites it as http://www.example.com/index.php?show=a/b! Notice that it has urldecoded the matched parameter in the replacement string.

Apache 2.2 introduced a new &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriteflags&quot;&gt;B flag&lt;/a&gt; to deal with this, but that apparently &lt;a href=&quot;https://issues.apache.org/bugzilla/show_bug.cgi?id=45529&quot;&gt;suffers the same problem&lt;/a&gt;! There are two workarounds I&#039;ve used that are both horrible: double-encode the source string (if you are in control of both start and end points of the URLs) to survive the spurious urldecode, or base-64 encode (javascript flavour) it and do the decoding yourself. I did warn you they were horrible.

I&#039;ll bet that there are a zillion mod_rewrites out there that suffer from this fundamental problem and haven&#039;t even noticed. If a few people voted for this to be fixed, it would probably go away... 
    </content:encoded>

    <pubDate>Wed, 20 Aug 2008 22:02:43 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/63-guid.html</guid>
    
</item>
<item>
    <title>Subversion MERGE error on commit nailed</title>
    <link>http://marcus.bointon.com/archives/62-Subversion-MERGE-error-on-commit-nailed.html</link>
            <category>Techie</category>
    
    <comments>http://marcus.bointon.com/archives/62-Subversion-MERGE-error-on-commit-nailed.html#comments</comments>
    <wfw:comment>http://marcus.bointon.com/wfwcomment.php?cid=62</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://marcus.bointon.com/rss.php?version=2.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    

    <author>marcus@bointon.com (Marcus Bointon)</author>
    <content:encoded>
    Recently I&#039;ve had a problem with subversion commits returning a &#039;200 OK&#039; result, accompanied by a peculiar MERGE error (when I&#039;m not doing a merge), but weirdly, the commit had actually made it into the repo. I&#039;d googled for this a while ago with no success, but I had another try today and found &lt;a href=&quot;http://www.ubergeek.tv/article.php?pid=136&quot;&gt;this post&lt;/a&gt;. Thinking about it, I&#039;d had this problem since updating to the very-very-long-awaited trac 0.11 release. So I tracked down &lt;a href=&quot;http://trac.edgewall.org/browser/branches/0.11-stable/contrib/trac-post-commit-hook&quot;&gt;the latest release of the trac-post-commit-hook script&lt;/a&gt; and installed that, and amazingly enough, it just works. Thank you UberGeek! 
    </content:encoded>

    <pubDate>Wed, 20 Aug 2008 17:35:32 +0100</pubDate>
    <guid isPermaLink="false">http://marcus.bointon.com/archives/62-guid.html</guid>
    
</item>

</channel>
</rss>