<?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>SickBiscuit</title>
	<atom:link href="http://sickbiscuit.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://sickbiscuit.com/blog</link>
	<description>The personal blog of Steven Wilkin</description>
	<lastBuildDate>Sun, 14 Feb 2010 18:10:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A dummy datasource for CakePHP</title>
		<link>http://sickbiscuit.com/blog/2010/02/14/a-dummy-datasource-for-cakephp/</link>
		<comments>http://sickbiscuit.com/blog/2010/02/14/a-dummy-datasource-for-cakephp/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 18:10:54 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=443</guid>
		<description><![CDATA[I was recently developing a project at work which at the beginning didn&#8217;t need a database. However, Cake was still testing the database connection and issuing a warning as a result when it couldn&#8217;t connect. My solution was to create a dummy datasource which silenced the warnings and allowed me to get on with the [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently developing a project at <a href="http://rehabstudio.com/">work</a> which at the beginning didn&#8217;t need a database. However, <a href="http://cakephp.org">Cake</a> was still testing the database connection and issuing a warning as a result when it couldn&#8217;t connect. My solution was to create a dummy datasource which silenced the warnings and allowed me to get on with the rest of development in relative peace.</p>
<p>The scope of the project changed and a database was required. The dummy datasource had to go so I thought I&#8217;d share it here before it was thrown to the winds.</p>
<p>Here&#8217;s the datasource, which belongs in <code>models/datasources/dbo/dbo_dummy.php</code>:</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> DboDummy <span style="color: #000000; font-weight: bold;">extends</span> DboSource <span style="color: #66cc66;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> connect<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">connected</span> = <span style="color: #000000; font-weight: bold;">true</span>;
                <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> disconnect<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">connected</span> = <span style="color: #000000; font-weight: bold;">false</span>;
                <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>To use the datasource use the following in your <code>config/database.php</code>:</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> DATABASE_CONFIG <span style="color: #66cc66;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$default</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
                <span style="color: #ff0000;">'driver'</span> =&gt; <span style="color: #ff0000;">'dummy'</span>,
                <span style="color: #ff0000;">'host'</span> =&gt; <span style="color: #ff0000;">''</span>,
                <span style="color: #ff0000;">'login'</span> =&gt; <span style="color: #ff0000;">''</span>,
                <span style="color: #ff0000;">'password'</span> =&gt; <span style="color: #ff0000;">''</span>,
                <span style="color: #ff0000;">'database'</span> =&gt; <span style="color: #ff0000;">''</span>,
        <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/02/14/a-dummy-datasource-for-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating a WordPress database between domains</title>
		<link>http://sickbiscuit.com/blog/2010/01/05/migrating-a-wordpress-database-between-domains/</link>
		<comments>http://sickbiscuit.com/blog/2010/01/05/migrating-a-wordpress-database-between-domains/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 12:20:59 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=433</guid>
		<description><![CDATA[Occassionally I find myself developing a WordPress theme which will then require moving from development into production or otherwise having to move a blog between domains.
Apart from the transfer of the files, including plugins, theme and core WordPress installation, there is only 1 slightly gotcha: the database. I&#8217;ve never been quite sure why but WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>Occassionally I find myself developing a <a href="http://wordpress.org/">WordPress</a> theme which will then require moving from development into production or otherwise having to move a blog between domains.</p>
<p>Apart from the transfer of the files, including plugins, theme and core WordPress installation, there is only 1 slightly gotcha: the database. I&#8217;ve never been quite sure why but WordPress stores the URL of the blog in it&#8217;s database, not once, but twice. For the blog to be migrated the database needs a slight tweak.</p>
<p>As always, create a backup before doing anything. This can be done with phpMyAdmin or using the <em>mysqldump</em> command like so:<br />
<code><br />
$ mysqldump -uUSER -pPASSWORD DATABASE &gt; /path/to/backup.sql<br />
</code></p>
<p>If the database is to be hosted on a different machine you can then import this dump using using which ever method you&#8217;re comfortable with. Finally, run the following query on the database, subsituting your own domain name:</p>
<pre>UPDATE
	wp_options
SET
	option_value = 'http://DOMAIN.TLD'
WHERE
	option_name IN ('siteurl', 'home');</pre>
<p>That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/01/05/migrating-a-wordpress-database-between-domains/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL database backup with remote storage</title>
		<link>http://sickbiscuit.com/blog/2010/01/04/mysql-database-backup-with-remote-storage/</link>
		<comments>http://sickbiscuit.com/blog/2010/01/04/mysql-database-backup-with-remote-storage/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 15:37:28 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=418</guid>
		<description><![CDATA[Prevent a disaster
After reading Jeff Atwood&#8217;s backup failure last month I decided to finally get around to doing something I&#8217;d been intending to do &#8220;one of these days&#8221; but had in actual fact been putting off for years.
Here&#8217;s the steps I took to ensure the databases on my webserver were backed up every night and [...]]]></description>
			<content:encoded><![CDATA[<h3>Prevent a disaster</h3>
<p>After reading <a href="http://www.codinghorror.com/blog/archives/001315.html">Jeff Atwood&#8217;s backup failure</a> last month I decided to finally get around to doing something I&#8217;d been intending to do &#8220;one of these days&#8221; but had in actual fact been putting off for <em>years</em>.</p>
<p>Here&#8217;s the steps I took to ensure the databases on my webserver were backed up every night and copies of the dumps stored remotely.</p>
<h3>On the remote storage machine</h3>
<p>Generate an ssh key pair with and empty password and put the public key on the remote server. This will give our script access to the server without requiring you to enter a password each time:<br />
<code><br />
$ ssh-keygen -t rsa -f /home/steve/code/db_backup/id_rsa<br />
$ scp /home/steve/code/db_backup/id_rsa.pub REMOTEHOST:<br />
</code></p>
<p>This script will fetch all the backups, logging in as the <em>rsync</em> user and using the private key just generated. It&#8217;s located at <em>/home/steve/code/db_backup/sync_backups.sh</em>:</p>
<pre class="bash"><span style="color: #808080; font-style: italic;">#!/usr/bin/env bash</span>
rsync -e <span style="color: #ff0000;">&quot;ssh -l rsync -i /home/steve/code/db_backup/id_rsa&quot;</span> -avz REMOTEHOST:mysql/ /data/primary/backup/mysql/</pre>
<p>Have this happen automatically daily at 12:20am:<br />
<code><br />
$ crontab -l<br />
# m h  dom mon dow   command<br />
20	0	*	*	*	/home/steve/code/db_backup/sync_backups.sh<br />
$<br />
</code></p>
<h3>On the machine to be backed up</h3>
<p>Create a new user and allow ssh access with the previously generated key:<br />
<code><br />
# adduser rsync<br />
# mkdir ~rsync/.ssh<br />
# mv ~steve/id_rsa.pub ~rsync/.ssh/authorized_keys<br />
# chown rsync:rsync ~rsync/.ssh/authorized_keys<br />
# chmod 400 ~rsync/.ssh/authorized_keys<br />
</code></p>
<p>This script will dump all available databases and is located at <em>/root/bin/backup_databases.sh</em>:</p>
<pre class="bash"><span style="color: #808080; font-style: italic;">#!/usr/bin/env bash</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># dump all available databases</span>
<span style="color: #808080; font-style: italic;"># SJW</span>
&nbsp;
<span style="color: #0000ff;">AUTH=</span><span style="color: #ff0000;">'-uroot -pROOTPASSWORD'</span>
<span style="color: #0000ff;">DBS=</span>`mysql <span style="color: #0000ff;">$AUTH</span> --skip-column-names -e <span style="color: #ff0000;">'SHOW DATABASES;'</span>`
<span style="color: #0000ff;">BACKUPS=</span><span style="color: #ff0000;">'/home/rsync/mysql/'</span>
&nbsp;
<span style="color: #b1b100;">for</span> DB <span style="color: #b1b100;">in</span> <span style="color: #0000ff;">$DBS</span>
<span style="color: #b1b100;">do</span>
	mysqldump <span style="color: #0000ff;">$AUTH</span> <span style="color: #0000ff;">$DB</span> &gt; <span style="color: #0000ff;">$BACKUPS</span>`date +%Y%m%d%H%M`_<span style="color: #0000ff;">$DB</span>.sql
<span style="color: #b1b100;">done</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># delete backups older than 5 days</span>
find <span style="color: #0000ff;">$BACKUPS</span> -mtime <span style="color: #cc66cc;">+5</span> -<span style="color: #000066;">type</span> f | awk <span style="color: #ff0000;">'{print &quot;rm &quot;$1}'</span> | sh</pre>
<p>Have the script run nightly at 12:10am via cron:<br />
<code><br />
# crontab -l<br />
# m h  dom mon dow   command<br />
10  0 * * * /root/bin/backup_databases.sh<br />
#<br />
</code></p>
<h3>Closing thoughts</h3>
<p>This approach is realtively straight forward, everything happens automatically and it could easily be extended to cover mailboxes, source code repositories, uploaded content etc. However, for mission-critical databases <a href="http://dev.mysql.com/doc/refman/5.0/en/replication.html">master-slave replication</a> may be more appropriate. For further reading you may enjoy <a href="http://jwz.livejournal.com/801607.html">JWZ&#8217;s thoughts on backups</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/01/04/mysql-database-backup-with-remote-storage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>6 months of Rehab</title>
		<link>http://sickbiscuit.com/blog/2009/12/13/6-months-of-rehab/</link>
		<comments>http://sickbiscuit.com/blog/2009/12/13/6-months-of-rehab/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 02:18:53 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Clerical]]></category>
		<category><![CDATA[Photo]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=404</guid>
		<description><![CDATA[I find it hard to believe, but I crossed the 6 month milestone at Rehab this week.
The time has went in quickly, with a fast-pace and quick turnaround times being the norm. The vibe in the office has been great, with a decent soundsystem pumping out dance music all day and my producer Gary, aka [...]]]></description>
			<content:encoded><![CDATA[<p>I find it hard to believe, but I crossed the <a href="/blog/2009/06/16/developer-rehab/">6 month milestone</a> at <a href="http://rehabstudio.com/">Rehab</a> this week.</p>
<p>The time has went in quickly, with a fast-pace and quick turnaround times being the norm. The vibe in the office has been great, with a decent soundsystem pumping out dance music all day and my producer Gary, aka <a href="http://djgaryquinn.com/">DJ Gary Quinn</a>, dropping in a few choice chunes.</p>
<p>The guys here have a real passion for the web and enjoy a good laugh, for instance, this week we had a challenge to wear a different hat each day. Here&#8217;s Iain and Jurgen in their full cowboy glory:</p>
<p><img src="/blog/wp-content/uploads/2009/12/rehab_cowboys_iain_and_jurgen-400x300l.jpg" alt="" title="Rehab Cowboys Iain and Jurgen" width="400" height="300" class="alignnone size-full wp-image-407" /></p>
<p>I spend most of my days wrangling <a href="http://cakephp.org">CakePHP</a>, the PHP framework I started developing with <a href="/blog/2007/02/07/cakephp/">nearly 3 years ago</a> now. I also do most of the administration of the Linux boxes used to host the client sites and automate as much as I can with handy bash scripts, all from the comfort of this shiny iMac:</p>
<p><img src="/blog/wp-content/uploads/2009/12/rehab_imac_300x400.jpg" alt="" title="Rehab iMac" width="300" height="400" class="alignnone size-full wp-image-406" /></p>
<p>On the downside the standard working hours are 9 to 6, which is longer than I&#8217;m accustomed to. You can&#8217;t have it all <img src='http://sickbiscuit.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/12/13/6-months-of-rehab/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mashing up Twitter Trends and Google Images</title>
		<link>http://sickbiscuit.com/blog/2009/09/15/mashing-up-twitter-trends-and-google-images/</link>
		<comments>http://sickbiscuit.com/blog/2009/09/15/mashing-up-twitter-trends-and-google-images/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 09:50:40 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=397</guid>
		<description><![CDATA[I recently released the latest entry in my series of nano-apps.
As with my previous efforts, istrending.com serves serves no real purpose other than as an act of deliberate practice: going through the process of coming up with an idea, writing code, registering domain names, setting up Cron jobs and configuring deployment systems to get it [...]]]></description>
			<content:encoded><![CDATA[<p>I recently released the latest entry in my series of <a href="/blog/2009/01/26/nano-apps/">nano-apps</a>.</p>
<p>As with my previous efforts, <a href="http://istrending.com">istrending.com</a> serves serves no real purpose other than as an act of deliberate practice: going through the process of coming up with an idea, writing code, registering domain names, setting up Cron jobs and configuring deployment systems to get it all up and running in a production environment.</p>
<p>I questioned why I was even bothering with an app that was likely not going to see any traffic or be of use to people and when I hit a minor javascript problem the project was shelved for a few months. I recently had a fresh burst of enthusiasm though and got the usual sense of achievement when I deemed the code &#8220;ready enough&#8221; and a quick <code>cap deploy</code> took care of the rest.</p>
<p>The main problem I&#8217;ve faced with this app concerns the script used to update the list of trending topics: the Twitter search api has a known issue of returning HTML instead of JSON, which has on occasion caused my inbox to be filled with emails from the Cron daemon alerting me to failed jobs. I&#8217;m also not very happy with how the javascript carousel functions, so there&#8217;s some scope for improvement there.</p>
<p>The code is available on <a href="http://github.com/stevenwilkin/istrending.com">GitHub</a> as usual.</p>
<p>Next up is probably something bigger, very likely involving Rails. I&#8217;ve been reading up on the various testing methodologies used in the Ruby world and have written my first set of RSpec tests so I hoping my next release will at least have some test coverage. Other than that I&#8217;ll just have to see what ideas come to mind between now and then.</p>
<p>Any suggestions on what I should do next?</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/09/15/mashing-up-twitter-trends-and-google-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5&#215;5 strength training program</title>
		<link>http://sickbiscuit.com/blog/2009/07/31/5x5-strength-training-program/</link>
		<comments>http://sickbiscuit.com/blog/2009/07/31/5x5-strength-training-program/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 11:55:58 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=391</guid>
		<description><![CDATA[Since my last update strength training I&#8217;ve progressed from 3 sets of 5 reps to 5 sets of 5 reps: the infamous 5&#215;5.
I&#8217;m still training 3 days a week, Monday, Wednesday and Friday before work, still not doing any cardio and the Osgood Schlatters is still giving me gip.
Here&#8217;s what my routine has been like [...]]]></description>
			<content:encoded><![CDATA[<p>Since my last update strength training I&#8217;ve progressed from 3 sets of 5 reps to 5 sets of 5 reps: the infamous 5&#215;5.</p>
<p>I&#8217;m still training 3 days a week, Monday, Wednesday and Friday before work, still not doing any cardio and the <a href="http://en.wikipedia.org/wiki/Osgood-Schlatter_disease">Osgood Schlatters</a> is still giving me gip.</p>
<p>Here&#8217;s what my routine has been like lately:</p>
<ul>
<li>Monday
<ul>
<li>Front Squat</li>
<li>Overhead Press or Dumbbell Bench Press</li>
<li>Clean</li>
</ul>
</li>
<li>Wednesday
<ul>
<li>Front Squat</li>
<li>Overhead Press or Dumbbell Bench Press</li>
<li>Barbell Row</li>
</ul>
</li>
<li>Friday
<ul>
<li>Front Squat</li>
<li>Overhead Press or Dumbbell Bench Press</li>
<li>Deadlift</li>
</ul>
</li>
</ul>
<p>I&#8217;m training the front squat every session and alternating the overhead press and the dumbbell bench press between sessions. Taking into mind my knee difficulties I&#8217;m training the squat with relatively low intensity and wearing a knee sleeve which is giving me a much needed opportunity to work on my form and control.</p>
<p>As an aside, I&#8217;ve been working towards another goal: making it into the light-heavyweight division. It&#8217;s been tough going, I&#8217;m sick of the sight of food a lot of the time and have even been supplementing with vitamin B12 to see if I can boost my appetite sufficiently. I&#8217;ll be sure to let you know if I hit this milestone <img src='http://sickbiscuit.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/07/31/5x5-strength-training-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developer Rehab</title>
		<link>http://sickbiscuit.com/blog/2009/06/16/developer-rehab/</link>
		<comments>http://sickbiscuit.com/blog/2009/06/16/developer-rehab/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 08:12:29 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Clerical]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=385</guid>
		<description><![CDATA[My unemployment is over! Last week I started as a developer with Rehab Studio. Code on!
]]></description>
			<content:encoded><![CDATA[<p>My unemployment is over! Last week I started as a developer with <a href="http://rehabstudio.com/">Rehab Studio</a>. Code on!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/06/16/developer-rehab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Because everyone needs their own URL shortening service</title>
		<link>http://sickbiscuit.com/blog/2009/04/21/because-everyone-needs-their-own-url-shortening-service/</link>
		<comments>http://sickbiscuit.com/blog/2009/04/21/because-everyone-needs-their-own-url-shortening-service/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:15:46 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=378</guid>
		<description><![CDATA[At the moment I&#8217;m in between paid work and have been using my time to generally enjoy life but to also improve my skills. I&#8217;m all about the skills.
As an act of deliberate practice to hone my skills with web-application development and to deepen my understanding of the Rails framework I&#8217;ve been adding to my [...]]]></description>
			<content:encoded><![CDATA[<p>At the moment I&#8217;m in between paid work and have been using my time to generally enjoy life but to also improve my skills. I&#8217;m all about the skills.</p>
<p>As an act of <a href="http://freakonomics.blogs.nytimes.com/2008/03/11/how-did-a-rod-get-so-good/">deliberate practice</a> to hone my skills with web-application development and to deepen my understanding of the Rails framework I&#8217;ve been adding to my collection of <a href="/blog/2009/01/26/nano-apps/">nano-apps</a>.</p>
<p>A while back I had an idea to develop a URL shortener just to see how little code would be required but decided the world really didn&#8217;t need another one. With time on my hands over Easter &#038; the curiosity of a technology entusiast I just started hacking and had a functioning prototype within a short time-frame.</p>
<p>I wasn&#8217;t keen on parting with my shiny pennies for a domain name considering my lack of income but I&#8217;d written the code and thought I&#8217;d may as well go the whole hog and get my work into the wild.</p>
<p>So, without further ado, I present <a href="http://io.gd/">io.gd</a> . As usual, code is available on <a href="http://github.com/stevenwilkin/io.gd">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/04/21/because-everyone-needs-their-own-url-shortening-service/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finally, after 2 and a half years, my Rails DVD catalogue is go</title>
		<link>http://sickbiscuit.com/blog/2009/04/16/finally-after-2-and-a-half-years-my-rails-dvd-catalogue-is-go/</link>
		<comments>http://sickbiscuit.com/blog/2009/04/16/finally-after-2-and-a-half-years-my-rails-dvd-catalogue-is-go/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 13:33:28 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Movies]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=369</guid>
		<description><![CDATA[Well, it only took me 2 and a half years but I finally used Rails to develop a catalogue for my DVD collection.
The catalogue loosely fits in with my series of nano-apps and is hosted on movies.stevenwilkin.com. The code is publicly available on GitHub for anyone who&#8217;s interested.
All&#8217;s left now is to actually use the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it only took me <a href="blog/2006/10/18/ruby-on-rails/">2 and a half years</a> but I finally used Rails to develop a catalogue for my DVD collection.</p>
<p>The catalogue loosely fits in with my series of <a href="/blog/2009/01/26/nano-apps/">nano-apps</a> and is hosted on <a href="http://movies.stevenwilkin.com/">movies.stevenwilkin.com</a>. The code is publicly available on <a href="http://github.com/stevenwilkin/movies.stevenwilkin.com">GitHub</a> for anyone who&#8217;s interested.</p>
<p>All&#8217;s left now is to actually <em>use</em> the system and fill in the details of my collection!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/04/16/finally-after-2-and-a-half-years-my-rails-dvd-catalogue-is-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An experiment with Sinatra, HAML and Blueprint CSS</title>
		<link>http://sickbiscuit.com/blog/2009/04/15/an-experiment-with-sinatra-haml-and-blueprint-css/</link>
		<comments>http://sickbiscuit.com/blog/2009/04/15/an-experiment-with-sinatra-haml-and-blueprint-css/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 15:04:17 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=360</guid>
		<description><![CDATA[In my last post I considered transforming stevenwilkin.com into a Sinatra app.
Well, I did it, although I&#8217;m only mentioning it now.
Not only was this my first experience with Sinatra but I also decided to try using HAML for the markup and Blueprint CSS to help with the styling. If I&#8217;m going to play with a [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="/blog/2009/02/15/first-production-rails-app/">last post</a> I considered transforming <a href="stevenwilkin.com">stevenwilkin.com</a> into a <a href="http://www.sinatrarb.com/">Sinatra</a> app.</p>
<p>Well, I did it, although I&#8217;m only mentioning it now.</p>
<p>Not only was this my first experience with Sinatra but I also decided to try using <a href="http://haml.hamptoncatlin.com/">HAML</a> for the markup and <a href="http://www.blueprintcss.org/">Blueprint CSS</a> to help with the styling. If I&#8217;m going to play with <em>a</em> new technology why not play with a <em>few</em> new technologies?</p>
<p>I found Sinatra quite straight forward: you match up a HTTP verb (eg &#8216;GET&#8217;) and a url (eg &#8216;/&#8217;) with a block of Ruby and the results can be sent directly to the browser or an optional view template can be rendered. Simple!</p>
<p>Instead of a Model-View-Controller pattern like many of us are accustomed to, Sinatra provides more of a Controller-View setup which I believe would make it more suited to smaller apps which don&#8217;t necessarily make use of a database or where a full-stack framework like Rails would be overkill. If I create any more nano-apps in the future I&#8217;ll more than likely use it again.</p>
<p>What really struck me during this experiment and made the whole thing worthwhile was HAML. The simplicity and clarity of it&#8217;s syntax was super refreshing and meant I had to do a lot less typing and didn&#8217;t have to remember to close divs etc, never mind it being white-space sensitive! All Ruby-based web development I&#8217;ve done since has used it.</p>
<p>I wasn&#8217;t fussed on Blueprint. I found having a grid background during the *ahem* design phase to be great but I probably didn&#8217;t make enough use of it&#8217;s features for it to really shine through. In terms of styling and CSS I didn&#8217;t take much time to look at <a href="http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html">SASS</a> and didn&#8217;t use it, but I&#8217;ve since reread the documentation and may well make use of it in the future.</p>
<p>The app was deployed onto Passenger, like my previous experiments. It took a small bit of google-fu to get the Capfile and Rack configuration tweaked correctly but once this was done pushing the code into production with Capistrano was a breeze. How did I ever survive without Capistrano?</p>
<p>The deeper I get into Ruby the cruder PHP seems, not to mention C#. The future seems exciting.</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/04/15/an-experiment-with-sinatra-haml-and-blueprint-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
