<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Flashes from the archives</title>
	<atom:link href="http://flashesfromthearchives.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://flashesfromthearchives.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 10 Jun 2009 13:18:33 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='flashesfromthearchives.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/5777eec6eb500a06735218bb69174c62?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Flashes from the archives</title>
		<link>http://flashesfromthearchives.wordpress.com</link>
	</image>
			<item>
		<title>Find in Firefox frames</title>
		<link>http://flashesfromthearchives.wordpress.com/2009/06/10/find-in-firefox-frames/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2009/06/10/find-in-firefox-frames/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 12:07:22 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=92</guid>
		<description><![CDATA[If &#8211; like me &#8211; you spend a lot of time browsing Javadocs (e.g. http://java.sun.com/j2se/1.5.0/docs/api/) and/or Rails docs (e.g. http://api.rubyonrails.org/) and/or any other frames-based documentation, you may well have encountered a rather annoying feature of Firefox&#8217;s &#8220;find&#8221; functionality. Whenever you search (using Ctrl-F, or via Edit-&#62;Find) Firefox searches frames from left -&#62; right, top -&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=92&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If &#8211; like me &#8211; you spend a lot of time browsing Javadocs (e.g. <a href="http://java.sun.com/j2se/1.5.0/docs/api/">http://java.sun.com/j2se/1.5.0/docs/api/</a>) and/or Rails docs (e.g. <a href="http://api.rubyonrails.org/">http://api.rubyonrails.org/</a>) and/or any other frames-based documentation, you may well have encountered a rather annoying feature of Firefox&#8217;s &#8220;find&#8221; functionality. Whenever you search (using Ctrl-F, or via Edit-&gt;Find) Firefox searches frames from left -&gt; right, top -&gt; bottom. i.e. it searches the top left frame first, followed by the middle left frame, followed by the bottom left, followed by the top right, middle right, etc. This can be very annoying if you want to search in a particular frame; you either have to open the frame itself in a new tab, or you have to Ctrl-G through all the unwanted results (like me, you&#8217;ll probably end up over-shooting, and cursing).</p>
<p>Anyway&#8230;there&#8217;s an extension that fixes this problem, &#8220;Find in Frame&#8221;:</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1075">https://addons.mozilla.org/en-US/firefox/addon/1075</a></p>
<p>Having installed it &#8230; it appears to fix the problem. Will report any gotchas but &#8230; all looks good at the moment!</p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:95px;width:1px;height:1px;">
<h2 class="addon"><span>Find in Frame</span></h2>
</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=92&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2009/06/10/find-in-firefox-frames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>UTC/BST/GMT. Time increment with dual-boot Linux/XP</title>
		<link>http://flashesfromthearchives.wordpress.com/2009/05/25/utcbstgmt-time-increment-with-dual-boot-linuxxp/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2009/05/25/utcbstgmt-time-increment-with-dual-boot-linuxxp/#comments</comments>
		<pubDate>Mon, 25 May 2009 09:43:11 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=90</guid>
		<description><![CDATA[I have a FC9/WinXP dual boot machine. When we switched timezones a few weeks ago (from GMT to BST/IST) my computer&#8217;s time started behaving oddly. Whenever I rebooted, it always seemed to increment the current time by one hour. This certainly happened when Linux booted, and I think it happened when Windows booted too. Anyway [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=90&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have a FC9/WinXP dual boot machine. When we switched timezones a few weeks ago (from GMT to BST/IST) my computer&#8217;s time started behaving oddly. Whenever I rebooted, it always seemed to increment the current time by one hour. This certainly happened when Linux booted, and I <em>think</em> it happened when Windows booted too. Anyway .. it turns out that when you install Linux on a dual boot machine, you should always remember to uncheck the box that says &#8220;System uses UTC time&#8221;. I suspect I would have encoutered this problem a lot earlier if I lived in a time zone other than GMT±0. Anyway &#8230; it turns out you can fix it after the event as per <a href="http://www.undeclared-variable.com/Dual_Boot_and_UTC">these instructions</a>. In case this link disappears, the instructions are:</p>
<p>1. sudo system-config-time</p>
<p>2. Uncheck the box in &#8220;Time Zone&#8221; that says &#8220;System clock uses UTC&#8221;.</p>
<p>3. sudo /usr/sbin/ntpdate pool.ntp.org  (to manually reset your computer&#8217;s date/time)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=90&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2009/05/25/utcbstgmt-time-increment-with-dual-boot-linuxxp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>sendmail  &#8220;Name server timeout&#8221;</title>
		<link>http://flashesfromthearchives.wordpress.com/2009/03/18/sendmail-name-server-timeout/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2009/03/18/sendmail-name-server-timeout/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 12:10:51 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[name server]]></category>
		<category><![CDATA[nameserver]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[timeout]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=86</guid>
		<description><![CDATA[So, as it never rains but pours, after fixing the NAS problem detailed below, everything worked fine for a couple of days. Then &#8230; suddenly my email notifications from the backup process stopped. I logged into the machine in question, and ran sendmail from the command like but &#8230; it just kind-of sat there for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=86&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So, as it never rains but pours, after fixing the NAS problem detailed below, everything worked fine for a couple of days. Then &#8230; suddenly my email notifications from the backup process stopped. I logged into the machine in question, and ran <em>sendmail</em> from the command like but &#8230; it just kind-of sat there for a while, and then appeared to timeout.</p>
<p>So &#8230; I checked in <em>/var/spool/mail/[username]</em> and saw that the messages were not being sent; the reason appears to be the following line:</p>
<pre>   451 xxxxxx.xxx: Name server timeout</pre>
<p>(&#8216;x&#8217;s added by me, for privacy!)</p>
<p>Some Googling (mainly for: <em>sendmail &#8220;Name server timeout&#8221;</em>) led me to <a title="sendmail 451 name server timeout" href="http://www.terencekwan.com/sendmail-451-name-server-timeout">this page</a>. There are probably pages that better describe the problem (it&#8217;s something to do with how sendmail deals with incorrect IPv6 AAAA records) , but the solution is stated on this page, clearly and concisely. I will repeat the fix here here (in <em>slightly</em> more detail), in case the above link disappears:</p>
<ol>
<li>(as root) cd /etc/mail</li>
<li>Edit sendmail.mc and add the following at the end of the file:</li>
<li>define(`confBIND_OPTS&#8217;, `WorkAroundBrokenAAAA&#8217;)dnl</li>
<li>type make</li>
<li>restart sendmail (<em>/sbin/service sendmail restart</em>)</li>
</ol>
<p>Note that in the <a title="sendmail 451 name server timeout" href="http://www.terencekwan.com/sendmail-451-name-server-timeout">original page</a>, the quotation marks are incorrect; the apostrophes have been replaced by an end-quote (presumably by the blog software). i.e.</p>
<p>define(`confBIND_OPTS<strong><span style="color:#ff0000;">’</span></strong>, `WorkAroundBrokenAAAA<strong><span style="color:#ff0000;">’</span></strong>)dnl</p>
<p>is incorrect. The line should read:</p>
<p>define(`confBIND_OPTS<strong><span style="color:#ff0000;">&#8216;</span></strong>, `WorkAroundBrokenAAAA<strong><span style="color:#ff0000;">&#8216;</span></strong>)dnl</p>
<p>Not noticing this error led to me seeing the following error when running <em>make</em>:</p>
<pre>   NONE:0: m4: ERROR: end of file in argument list
   make: *** [sendmail.cf] Error 1</pre>
<p><strong>More impotant note</strong>: I&#8217;m not responsible for the accuracy of this content; I <em>do </em>accept reponsibility for the following advice: &#8220;Take a backup of your sendmail config before embarking on the above!&#8221;.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=86&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2009/03/18/sendmail-name-server-timeout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>Yelp! Check your nas backups aren&#8217;t disappearing into a black hole!</title>
		<link>http://flashesfromthearchives.wordpress.com/2009/03/13/yelp-check-your-nas-backups-arent-disappearing-into-a-black-hole/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2009/03/13/yelp-check-your-nas-backups-arent-disappearing-into-a-black-hole/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 13:16:13 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=66</guid>
		<description><![CDATA[So, for a while I have been copying up our nightly database backup to an NAS server provided by our co-lo. The backup file is (after gzipping &#38; encrypting) approximately 10GB. I&#8217;m running Linux kernel 2.6.18, Oracle EL distro. I mount the NAS server locally using the cifs module. So, I have an entry in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=66&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So, for a while I have been copying up our nightly database backup to an NAS server provided by our co-lo. The backup file is (after gzipping &amp; encrypting) approximately 10GB. I&#8217;m running Linux kernel 2.6.18, Oracle EL distro. I mount the NAS server locally using the cifs module. So, I have an entry in fstab looking as follows:</p>
<pre>//X.X.X.X/username /mnt/nas cifs _netdev,user=XXX%23xxx,uid=xxx 0 0</pre>
<p>(where the X&#8217;s indicate sensitive data!). I then just copy the local backup file to /mnt/nas, using &#8220;cp&#8221;. I would prefer to use rsync, or similar, but &#8230; NAS is all our co-lo offers.</p>
<p>Anyway, periodically I have been checking that I can re-import these backups into a test database. All fine. However, recently I tried again and &#8230; discovered that [for some unknown amount of time] the backups have not been making it to the NAS server in one piece. A file is created there, and it even has the correct size but &#8230; after a few GB, it is corrupted somehow (I&#8217;ve read reports that <a title="Copying large files to CIFS mount (XP) may corrupt data!?" href="http://linuxneophyte.com/copying-large-files-to-cifs-mount-xp-may-corrupt-data/">&#8216;\ 0&#8242; bytes replace the original data</a>).</p>
<p><strong>Lesson 1: Don&#8217;t put all of your eggs in one basket.</strong> Luckily, in my case, the NAS server wasn&#8217;t the <em>sole</em> repository for our database backups. But the above experience serves as a timely reminder of the importance of this policy!</p>
<p><strong>Lesson 2: Periodically check your backups. </strong>Again, this I do but &#8230; not as often as I should have. I think I will implement a <em>daily</em> process to re-import the backups into a test db. Some people don&#8217;t have this luxury. If your production database is huge, then having a test database that&#8217;s big enough to import your nightly backups on a daily basis, within a reasonable time-frame might be a luxury you cannot afford. Still, check them as often as possible.</p>
<p><strong>Lesson 3: Check checksums! </strong>I had fallen into the trap of thinking &#8220;it&#8217;s a mounted filesystem, I&#8217;m using &#8216;cp&#8217;, the filesizes are the same&#8230;<em>what could possibly go wrong?</em>&#8221; Well&#8230;it looks like things <em>can</em> go wrong. Kind-of obvious really. So, these days, after copying the backup to the NAS server, I now double check that the remote file has the same checksum as my local backup. I use <a title="md5sum man page" href="http://www.linuxmanpages.com/man1/md5sum.1.php">md5sum</a>, a standard linux tool. If I was fortunate enough to have a shell login for the remote NAS server, I would generate the checksum there. As it is, though, I have to generate it on my local machine which &#8211; effectively &#8211; means that I have to copy the whole backup <em>back</em> across the network again! It&#8217;s worth it though.</p>
<p><strong>Finally, the solution to the bug:</strong> After a bit of googling, I found the following pages:</p>
<ol>
<li><a title="Copying large files to CIFS mount (XP) may corrupt data!?" href="http://linuxneophyte.com/copying-large-files-to-cifs-mount-xp-may-corrupt-data/">Copying large files to CIFS mount (XP) may corrupt data!? </a></li>
<li><a title="Corrupted data on write to Windows 2003 Server" href="http://www.nabble.com/Corrupted-data-on-write-to-Windows-2003-Server-td7763783.html">Corrupted data on write to Windows 2003 Server</a></li>
</ol>
<p>I checked in /var/log/messages, which is where the cifs filesystem logs to (as it&#8217;s a kernel module), and saw messages such as:</p>
<pre>CIFS VFS: No response to cmd 47 mid 33281
CIFS VFS: Write2 ret -11, written = 0
CIFS VFS: No response for cmd 50 mid 33289
CIFS VFS: server not responding</pre>
<p>The problem appears to be that the client-side cifs cache can corrupt your data if you&#8217;re copying a large file, and if the server is unavailable at any point during the copy (e.g. if the network is a bit flaky, or the server is momentarily slow/unresponsive) . The solution is to disable the client side cache by adding the <strong>forcedirectio</strong> option to the mount options, as follows:</p>
<pre>//X.X.X.X/username /mnt/nas cifs _netdev,user=XXX%23xxx,uid=xxx,<strong>forcedirectio</strong> 0 0</pre>
<p>One of the links above points <a title="patch to cifs.ko" href="http://master.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=cb876f451455b6187a7d69de2c112c45ec4b7f99">here</a>, which suggests that there is a patch for the cifs kernel module, but I&#8217;m unsure whether this patch has been applied to the linux trunk yet. If you know, feel free to leave a comment!</p>
<p>(the above advice comes with all the usual disclaimers. for example, this looks rather scary: <a title="CIFS option forcedirectio fails to allow the appending of text to files." href="https://bugzilla.redhat.com/show_bug.cgi?id=460063"><span class="bz_default_hidden" style="display:inline;"><span>CIFS option forcedirectio fails to allow the appending of text to files.</span></span></a>)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=66&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2009/03/13/yelp-check-your-nas-backups-arent-disappearing-into-a-black-hole/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>php is rubbish</title>
		<link>http://flashesfromthearchives.wordpress.com/2009/01/08/php-is-rubbish/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2009/01/08/php-is-rubbish/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 22:13:25 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=56</guid>
		<description><![CDATA[I mean, not completely rubbish &#8211; it&#8217;s not as if you can&#8217;t develop pretty good applications using it. But&#8230;My main gripe?
strpos()
 int strpos(string $haystack, mixed $needle [,int $offset])
Ok, what&#8217;s wrong with it? Well, in my experience, it would seem very natural to write the following:
  $x = "blah";
  $y = "x";
  if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=56&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I mean, not <em>completely</em> rubbish &#8211; it&#8217;s not as if you can&#8217;t develop pretty good applications using it. But&#8230;My main gripe?</p>
<p><a href="http://ie.php.net/manual/en/function.strpos.php"><strong>strpos()</strong></a></p>
<p><code style="font-size:smaller;"> int strpos(string $haystack, mixed $needle [,int $offset])</code></p>
<p>Ok, what&#8217;s wrong with it? Well, in my experience, it would seem very natural to write the following:</p>
<pre>  $x = "blah";
  $y = "x";
  if (strpos($x, $y)&gt;=0) {
    print "x contains y";
  }</pre>
<p>and expect it to output <em>nothing</em>.</p>
<p>But &#8230; it outputs &#8220;x contains y&#8221;. Why? Because strpos($x, $y) returns false (1), and false&gt;=0 (2).</p>
<p>(1) is certainly wrong in my mind (why not return -1, or even <em>null</em>?)</p>
<p>(2) is rather ugly, but I can deal with it.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=56&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2009/01/08/php-is-rubbish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>Czech month names</title>
		<link>http://flashesfromthearchives.wordpress.com/2008/12/11/czech-month-names/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2008/12/11/czech-month-names/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 12:38:22 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[flashes]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[czech]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[month]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=53</guid>
		<description><![CDATA[Today I had reason to investigate how months are named in Czech.
My issue was that the Sun java jre (1.5/1.6), for some reason (I presume it&#8217;s just something that never got implemented properly) thinks that Czechs abbreviate their months with Roman numerals. So, for example, where an English speaker might write &#8220;10 Dec 2008&#8243;, java [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=53&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I had reason to investigate how months are named in Czech.</p>
<p>My issue was that the Sun java jre (1.5/1.6), for some reason (I presume it&#8217;s just something that never got implemented properly) thinks that Czechs abbreviate their months with Roman numerals. So, for example, where an English speaker might write &#8220;10 Dec 2008&#8243;, java thinks that a Czech speaker would write &#8220;20 XII 2008&#8243;. I&#8217;ve found no evidence that java is correct in its thinking. Furthermore, a (Czech) client of ours has complained about this.</p>
<p>I have customized our java code such that it uses the &#8220;proper&#8221; abbreviated names for months, when formatting dates in Czech. In doing so, I came across this page http://www.unilang.org/wiki/index.php/Czech_months which suggests that the names for January and February (&#8220;leden&#8221; and &#8220;únor&#8221;) mean &#8220;ice&#8221; and &#8220;melting ice&#8221;. Names which I think are rather nice.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=53&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2008/12/11/czech-month-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Amarok to play m4a (and others)</title>
		<link>http://flashesfromthearchives.wordpress.com/2008/12/09/getting-amarok-to-play-m4a-and-others/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2008/12/09/getting-amarok-to-play-m4a-and-others/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 21:48:54 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[m4a]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=51</guid>
		<description><![CDATA[I installed amarok + gstreamer on linux:
sudo yum install amarok
sudo yum install gstreamer*
But had trouble getting amarok to play m4a files (from iTunes). The following fixed it:
sudo yum install amarok-extras-nonfree
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=51&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I installed amarok + gstreamer on linux:</p>
<p><strong>sudo yum install amarok<br />
sudo yum install gstreamer*</strong></p>
<p>But had trouble getting amarok to play m4a files (from iTunes). The following fixed it:</p>
<p><strong>sudo yum install amarok-extras-nonfree</strong></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=51&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2008/12/09/getting-amarok-to-play-m4a-and-others/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>ThinkPad T61 / Fedora / Dark screen after suspend/resume</title>
		<link>http://flashesfromthearchives.wordpress.com/2008/11/28/thinkpad-t61-fedora-dark-screen-after-suspendresume/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2008/11/28/thinkpad-t61-fedora-dark-screen-after-suspendresume/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:06:25 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=49</guid>
		<description><![CDATA[After a suspend, the screen remains very dark (basically, the backlight fails to turn back on again).
There is a trivial &#8220;fix&#8221; which is to switch virtual consoles:
ctrl-alt-F1
ctrl-alt-F7
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=49&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After a suspend, the screen remains very dark (basically, the backlight fails to turn back on again).<br />
There is a trivial &#8220;fix&#8221; which is to switch virtual consoles:<br />
ctrl-alt-F1<br />
ctrl-alt-F7</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=49&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2008/11/28/thinkpad-t61-fedora-dark-screen-after-suspendresume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;m going to whisper it&#8230;</title>
		<link>http://flashesfromthearchives.wordpress.com/2008/09/30/im-going-to-whisper-it/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2008/09/30/im-going-to-whisper-it/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 21:48:51 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=45</guid>
		<description><![CDATA[(because the media is full of apocalyptic predictions at the moment)
I think that the Irish government&#8217;s decision to guarantee all deposits held in Irish-regulated banks is essentially a massive bluff-calling exercise. They&#8217;re potentially exposed to losses of EUR 400 billion (although this theoretical maximum exposure would only be realised if the Irish banks&#8217; assets turned [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=45&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>(because the media is full of apocalyptic predictions at the moment)</p>
<p>I think that <a href="http://www.irishtimes.com/newspaper/breaking/2008/0930/breaking7.htm">the Irish government&#8217;s decision</a> to guarantee <em>all</em> deposits held in Irish-regulated banks is essentially a massive bluff-calling exercise. They&#8217;re <em>potentially </em>exposed to losses of EUR 400 billion (although this theoretical maximum exposure would only be realised if the Irish banks&#8217; assets turned out to have a combined value of zero euro &#8211; even with plummeting house prices, that won&#8217;t ever be the case!).</p>
<p>In the event of a total banking collapse, with all assets being worth zilch, the government would obviously <em>never</em> be able to pay out EUR 400 billion (amounting to EUR ~100,000 for every man, woman and child in the state!).</p>
<p>I can see why they&#8217;ve <em>said</em> it, and it&#8217;s (as far as I can see) quite sensible but&#8230;what they <em>really </em>mean is:</p>
<blockquote><p>Well&#8230;we&#8217;ll try to guarantee your savings (or any loans that you might have made to the banks), but&#8230;y&#8217;know, if more than one bank goes under, we&#8217;re all fecked so don&#8217;t expect any more than a copper coin and the address of a soup kitchen (run by a chinese international aid agency).</p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=45&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2008/09/30/im-going-to-whisper-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
		<item>
		<title>firebug is back &#8211; but was never really gone</title>
		<link>http://flashesfromthearchives.wordpress.com/2008/09/24/firebug-is-back-but-was-never-really-gone/</link>
		<comments>http://flashesfromthearchives.wordpress.com/2008/09/24/firebug-is-back-but-was-never-really-gone/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 20:38:53 +0000</pubDate>
		<dc:creator>k</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashesfromthearchives.wordpress.com/?p=43</guid>
		<description><![CDATA[Firebug has become an indispensible part of web development, in particular wrt writing and testing client-side code. However, I&#8217;ve been at a loss for the last little while on account of the fact that when I upgraded to Firefox 3, the Plugins manager told me that Firebug wasn&#8217;t compatible with Firefox 3. Turns out it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=43&subd=flashesfromthearchives&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Firebug has become an indispensible part of web development, in particular wrt writing and testing client-side code. However, I&#8217;ve been at a loss for the last little while on account of the fact that when I upgraded to Firefox 3, the Plugins manager told me that Firebug wasn&#8217;t compatible with Firefox 3. Turns out it is though, you just need to go and download the <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">more recent version</a> manually.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashesfromthearchives.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashesfromthearchives.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashesfromthearchives.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashesfromthearchives.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashesfromthearchives.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashesfromthearchives.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashesfromthearchives.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashesfromthearchives.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashesfromthearchives.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashesfromthearchives.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashesfromthearchives.wordpress.com&blog=1257844&post=43&subd=flashesfromthearchives&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://flashesfromthearchives.wordpress.com/2008/09/24/firebug-is-back-but-was-never-really-gone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e913184f8f1f3b7f6409fb61edd8c17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">k</media:title>
		</media:content>
	</item>
	</channel>
</rss>