<?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>Robbie Bow &#187; robbiebow</title>
	<atom:link href="http://www.robbiebow.co.uk/blog/author/admin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.robbiebow.co.uk/blog</link>
	<description>Perl, MySQL, Money and Food</description>
	<lastBuildDate>Fri, 23 Jul 2010 08:37:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The brilliant idea</title>
		<link>http://www.robbiebow.co.uk/blog/the-brilliant-idea</link>
		<comments>http://www.robbiebow.co.uk/blog/the-brilliant-idea#comments</comments>
		<pubDate>Fri, 23 Jul 2010 08:37:21 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=312</guid>
		<description><![CDATA[As a new and avid fish keeper, I had a flash of inspiration a few nights ago at 3am, got up, wrote it down, and wrote off to a major pet product manufacturer offering to sell it to them. Now it really is a brilliant idea, and so far I haven&#8217;t seen anything like it [...]]]></description>
			<content:encoded><![CDATA[<p>As a new and avid fish keeper, I had a flash of inspiration a few nights ago at 3am, got up, wrote it down, and wrote off to a major pet product manufacturer offering to sell it to them. Now it really is a brilliant idea, and so far I haven&#8217;t seen anything like it on the market. I would tell you what the idea is, but then, you know, what would I have left to sell? This is something I&#8217;d like to pursue to a successful conclusion. I&#8217;m 3 emails into the attempt to sell and looking forward to further conversations with the manufacturer. I give it a 5% chance of success so far. That&#8217;s much better odds than the lottery and will actually produce something useful &#8211; a great new product that will make fishes and their custodians lives better. And a little lump sum for me too <img src='http://www.robbiebow.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Hmm. I might need an NDA or, at the very least, a decent contract with which to ensure I don&#8217;t end up left with nothing. Time to start looking for a brief&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/the-brilliant-idea/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a UUID to a new row in MySQL automatically</title>
		<link>http://www.robbiebow.co.uk/blog/add-a-uuid-to-a-new-row-in-mysql-automatically</link>
		<comments>http://www.robbiebow.co.uk/blog/add-a-uuid-to-a-new-row-in-mysql-automatically#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:51:22 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[Dunno]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[triggers]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=271</guid>
		<description><![CDATA[Unfortunately MySQL only supports the CURRENT_TIMESTAMP function for setting default values on a column. If you maintain a CMS type system you&#8217;ll more than likely want UUIDs for each article or page, and also likely want to keep that data in your MySQL database. UUIDs are commonly used as unique identifiers in ATOM or RSS [...]]]></description>
			<content:encoded><![CDATA[<p>Unfortunately MySQL only supports the CURRENT_TIMESTAMP function for setting default values on a column. If you maintain a CMS type system you&#8217;ll more than likely want UUIDs for each article or page, and also likely want to keep that data in your MySQL database. UUIDs are commonly used as unique identifiers in ATOM or RSS news feeds.</p>
<p>To automatically add a UUID when you insert a row, use a trigger:</p>
<pre>DELIMITER $$
CREATE
 /*[DEFINER = { user | CURRENT_USER }]*/
 TRIGGER `mydatabase`.`Add UUID to mytable` BEFORE INSERT
 ON `mydatabase`.`mytable`
 FOR EACH ROW BEGIN
 SET NEW.`uuid` = UUID();
 END$$
DELIMITER;
</pre>
<p>UUIDs are 36 characters wide, so a column type of CHAR(36) is suitable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/add-a-uuid-to-a-new-row-in-mysql-automatically/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The great banking stitch up</title>
		<link>http://www.robbiebow.co.uk/blog/the-great-banking-stitch-up</link>
		<comments>http://www.robbiebow.co.uk/blog/the-great-banking-stitch-up#comments</comments>
		<pubDate>Tue, 17 Nov 2009 21:12:38 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=251</guid>
		<description><![CDATA[So a while ago I wrote up a golden opportunity about to be missed and it looks like, indeed, it shall. Despite Bank of England Governor, Mervyn King, calling for exactly the same change, for exactly the same reasons, the Gubmint are going to give the FSA some illusory powers to interfere with bankers&#8217; employment [...]]]></description>
			<content:encoded><![CDATA[<p>So a while ago I wrote up a <a title="Golden Opportunity to Reform Banking" href="/blog/a-golden-opportunities-about-to-be-missed" target="_self">golden opportunity about to be missed</a> and it looks like, indeed, it shall. Despite Bank of England Governor, <a title="King calls for break-up of banks" href="http://www.ft.com/cms/s/0/7056b56a-bda8-11de-9f6a-00144feab49a.html" target="_blank">Mervyn King</a>, calling for exactly the same change, for exactly the same reasons, the Gubmint are going to give the FSA some illusory powers to <a href="http://www.citywire.co.uk/personal/-/news/markets-companies-and-funds/content.aspx?ID=367960" target="_blank">interfere with bankers&#8217; employment contracts</a>. These powers won&#8217;t be used and would be shot down in court if they were. It&#8217;s also an after-the-fact measure: The system is buggered already once you have your bonus because you get your bonus <em>after</em> you buy lots of risky debt / sell lots of unsustainable mortgages. It looks like Darling &amp; Brown are more interested in landing a fat <span style="text-decoration: line-through;">bribe</span> consultancy post from the bankers for themselves rather like <a href="http://news.bbc.co.uk/1/hi/business/7186975.stm" target="_blank">Tony Blair</a> than making Britain any better a place to live or do business.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/the-great-banking-stitch-up/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Fried Rice</title>
		<link>http://www.robbiebow.co.uk/blog/quick-fried-rice</link>
		<comments>http://www.robbiebow.co.uk/blog/quick-fried-rice#comments</comments>
		<pubDate>Wed, 11 Nov 2009 20:47:22 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[cooking]]></category>
		<category><![CDATA[fried rice]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=248</guid>
		<description><![CDATA[So the key to success with fried rice is to make sure your rice pretty dry before you fry it. Soak it then steam it (or boil it) then dry it a little in a warm pan, turning frequently so that it ends up moist, not damp, and all excess water is steamed off. Then [...]]]></description>
			<content:encoded><![CDATA[<p>So the key to success with fried rice is to make sure your rice pretty dry before you fry it. Soak it then steam it (or boil it) then dry it a little in a warm pan, turning frequently so that it ends up moist, not damp, and all excess water is steamed off. Then fry it in the wok with a little oil, turning frequently, veg, ginger, Chinese 5 spices &amp;c. I then made a well at the bottom of the wok and added some eggs and basically scrambled them there; mixing in the rice when they were half runny, half cooked, to make egg fried rice. Fry up some diced meat (chicken / pork / whatever) in another pan and add.</p>
<p>Om nom nom!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/quick-fried-rice/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>French Lessons in Cambridge</title>
		<link>http://www.robbiebow.co.uk/blog/french-lessons-in-cambridge</link>
		<comments>http://www.robbiebow.co.uk/blog/french-lessons-in-cambridge#comments</comments>
		<pubDate>Wed, 04 Nov 2009 12:06:01 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[cambridge]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[stuff]]></category>
		<category><![CDATA[French lesson Cambridge]]></category>
		<category><![CDATA[French lessons in Cambridge]]></category>
		<category><![CDATA[French tuition in Cambridge]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=242</guid>
		<description><![CDATA[If you are looking for private French lessons in Cambridge, you should contact Audrey via her web site Following on from my earlier log about the micro-site I made for a friend, I made another one for her; this time focused on French Lessons in Cambridge as the keywords of choice. Google and Yahoo! were [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>If you are looking for private French lessons in Cambridge, you should contact Audrey via her <a href="http://www.frenchlessonsincambridge.co.uk/" target="_blank">web site</a></p></blockquote>
<p>Following on from my <a href="/blog/french-tutor-in-cambridge">earlier log</a> about the micro-site I made for a friend, I made another one for her; this time focused on French Lessons in Cambridge as the keywords of choice.</p>
<p>Google and Yahoo! were happy with the sites, but Bing was not. They appear to have disappeared off Bing&#8217;s indexes completely, but this blog gets ranked highly on Bing for some reason. Let&#8217;s see if that continues.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/french-lessons-in-cambridge/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirecting MovableType URLs to WordPress in Lighty</title>
		<link>http://www.robbiebow.co.uk/blog/redirecting-movabletype-urls-to-wordpress-in-lighty</link>
		<comments>http://www.robbiebow.co.uk/blog/redirecting-movabletype-urls-to-wordpress-in-lighty#comments</comments>
		<pubDate>Tue, 03 Nov 2009 13:21:23 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[lighty]]></category>
		<category><![CDATA[movabletype]]></category>
		<category><![CDATA[url redirect with lighty]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=235</guid>
		<description><![CDATA[A while ago I migrated from MT to WordPress. This has meant lots of 404 errors as links / bookmarks to the old MT pages didn&#8217;t get redirected to their new WP equivalent. My bad. I should have sorted this out at the time I migrated. Better late than never. Here&#8217;s what I&#8217;ve done in [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago <a href="/blog/new-blog-backend">I migrated from MT to WordPress</a>. This has meant lots of 404 errors as links / bookmarks to the old MT pages didn&#8217;t get redirected to their new WP equivalent. My bad. I should have sorted this out at the time I migrated. Better late than never. Here&#8217;s what I&#8217;ve done in my lighttpd config:</p>
<p>1. Ensure the mod_redirect module is enabled</p>
<p>2. Added this to the site&#8217;s config:</p>
<pre>$HTTP["host"] =~ "example.com {</pre>
<pre>    url.redirect =
    ( "/mt/"                 =&gt; "http://example.com/blog/",
      "atom.xml"             =&gt; "http://example.com/blog/feed",
      "rss.xml"              =&gt; "http://example.com/blog/feed",
      "^/blog/.+/(.+).html"  =&gt; "http://example.com/blog/$1"
    )
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/redirecting-movabletype-urls-to-wordpress-in-lighty/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iptables firewall &amp; Debian Aptitude on Memset miniserver</title>
		<link>http://www.robbiebow.co.uk/blog/iptables-firewall-and-debian-aptitude-on-memset-miniserver</link>
		<comments>http://www.robbiebow.co.uk/blog/iptables-firewall-and-debian-aptitude-on-memset-miniserver#comments</comments>
		<pubDate>Tue, 03 Nov 2009 12:53:52 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[debian aptitude]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[memset]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=225</guid>
		<description><![CDATA[By trial and error, I found that you need port 3128 outgoing open to make Debian&#8217;s aptitude happy on a Memset hosted &#8220;miniserver&#8221; virtual machine.  You also need to accept passive FTP transfers for apt to work well (at least on the Memset machine this blog is hosted on). Here&#8217;s an example of the iptables [...]]]></description>
			<content:encoded><![CDATA[<p>By trial and error, I found that you need port 3128 outgoing open to make Debian&#8217;s aptitude happy on a Memset hosted &#8220;miniserver&#8221; virtual machine.  You also need to accept passive FTP transfers for apt to work well (at least on the Memset machine this blog is hosted on). Here&#8217;s an <a title="Example iptables config for Memset VM" href="/static/firewall.memset.txt" target="_blank">example of the iptables settings</a> I use. This is geared towards a typical web server set up.</p>
<p>To apply these settings, I follow this routine (as a superuser)</p>
<p>1. Upload this emergency <a href="/static/firewall.open.txt" target="_blank">get-out-of-jail iptables</a> config to the server</p>
<p>2. Set up a cronjob to apply that config every 15 minutes</p>
<pre>$ crontab -e</pre>
<pre>*/15 * * * * iptables-restore &lt; /path/to/firewall.open.txt</pre>
<p>3. Upload the <a title="Example iptables config for Memset VM" href="/static/firewall.memset.txt" target="_blank">example iptables settings</a> to the server</p>
<p>4. Apply that config to iptables:</p>
<pre>iptables-restore &lt; /path/to/firewall.memset.txt</pre>
<p>5. Test one can reach the web site, connect via SSH, and ping the server, but cannot FTP or connect to mail ports</p>
<p>6. Once happy, disable the cronjob created in step 2 above, and check the firewall is up with</p>
<pre>iptables -L</pre>
<p>et voila! the server should now be pretty well locked down whilst allowing apt to connect to repositories, a web server serve up web pages, users connect via SSH and respond to ping requests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/iptables-firewall-and-debian-aptitude-on-memset-miniserver/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Protecting your email address on your web site</title>
		<link>http://www.robbiebow.co.uk/blog/protecting-your-email-address-on-your-web-site</link>
		<comments>http://www.robbiebow.co.uk/blog/protecting-your-email-address-on-your-web-site#comments</comments>
		<pubDate>Thu, 29 Oct 2009 15:03:18 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=221</guid>
		<description><![CDATA[The ReCAPTCHA  project has a neat facility called Mailhide which will give you a chunk of HTML to add to your page. Users then get the familiar ReCAPTCHA challenge in a new window to complete in order to see your email address, thus limiting the ability of harvesters to get your address. You can see [...]]]></description>
			<content:encoded><![CDATA[<p>The ReCAPTCHA  project has a neat facility called <a title="ReCAPTCHA Mailhide" href="http://mailhide.recaptcha.net/" target="_blank">Mailhide</a> which will give you a chunk of HTML to add to your page. Users then get the familiar ReCAPTCHA challenge in a new window to complete in order to see your email address, thus limiting the ability of harvesters to get your address.</p>
<p>You can see this at work on my <a href="/">home page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/protecting-your-email-address-on-your-web-site/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTC Hero</title>
		<link>http://www.robbiebow.co.uk/blog/htc-hero</link>
		<comments>http://www.robbiebow.co.uk/blog/htc-hero#comments</comments>
		<pubDate>Mon, 26 Oct 2009 11:25:04 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[stuff]]></category>
		<category><![CDATA[HTC Hero]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=217</guid>
		<description><![CDATA[After having my  cheap Nokia phone stolen in Barcelona last weekend I went out and bought an even cheaper Sony Ericsson the day I arrived home. That turned out to be unsatisfying, so I opted to get an HTC Hero and join the smart-phone nation. It&#8217;s a nice gadget. I love the ease with which [...]]]></description>
			<content:encoded><![CDATA[<p>After having my  cheap Nokia phone stolen in Barcelona last weekend I went out and bought an even cheaper Sony Ericsson the day I arrived home. That turned out to be unsatisfying, so I opted to get an HTC Hero and join the smart-phone nation.</p>
<p>It&#8217;s a nice gadget. I love the ease with which I could integrate my Gmail contacts and link them with Facebook profiles. It&#8217;s taken a couple of hours, but this prompted me to tidy up my contacts. Now I have emails and phone numbers together. Changes I make in Gmail synchronize with the phone and vice versa. This is good.  I haven&#8217;t found a music app that compares to iTunes ( not that I&#8217;ve looked properly yet ), so any tips on a suitable candidate most welcome.</p>
<p>Comparing the Hero with my iPod Touch, I find the iPod a more polished product. The Hero freezes occasionally for small amounts of time. It feels like &#8211; as other reviewers have said &#8211; the hardware is the weak spot. The UI is good; the potential for uses, great, but that freezing experience is a bit disappointing. Not to say I am disappointed: overall I am very pleased, but there is room for some improvement. Value for money, compared to the iPhone, the Hero wins.</p>
<p>If HTC heed the reviews, I hope to see a more robust box that gives the software the processing and memory it deserves in the not too distant future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/htc-hero/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drop a column in a SQLite table</title>
		<link>http://www.robbiebow.co.uk/blog/drop-a-column-in-a-sqlite-table</link>
		<comments>http://www.robbiebow.co.uk/blog/drop-a-column-in-a-sqlite-table#comments</comments>
		<pubDate>Tue, 13 Oct 2009 10:35:29 +0000</pubDate>
		<dc:creator>robbiebow</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[drop column sqlite]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.robbiebow.co.uk/blog/?p=215</guid>
		<description><![CDATA[SQLite doesn&#8217;t support DROP COLUMN. This means you need to do something slightly more complex to drop a column: BEGIN TRANSACTION; CREATE TABLE t1_new ( foo  TEXT PRIMARY KEY, bar  TEXT, baz  INTEGER, ); INSERT INTO t1_new SELECT foo, bar, baz FROM t1; DROP TABLE t1; ALTER TABLE t1_new RENAME TO t1; COMMIT; The quick [...]]]></description>
			<content:encoded><![CDATA[<p>SQLite doesn&#8217;t support DROP COLUMN. This means you need to do something slightly more complex to drop a column:</p>
<pre>BEGIN TRANSACTION;
CREATE TABLE t1_new (
 foo  TEXT PRIMARY KEY,
 bar  TEXT,
 baz  INTEGER,
);

INSERT INTO t1_new SELECT foo, bar, baz FROM t1;
DROP TABLE t1;
ALTER TABLE t1_new RENAME TO t1;
COMMIT;</pre>
<p>The quick way to get the SQL to create your new table would be to use the .schema command when connected to the database using the command line client.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robbiebow.co.uk/blog/drop-a-column-in-a-sqlite-table/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
