<?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>Chris&#039; Blog &#187; Network</title>
	<atom:link href="http://www.cs278.org/blog/category/technology/network/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cs278.org/blog</link>
	<description>“A metal loving, web developing, open source contributor.”</description>
	<lastBuildDate>Sun, 03 Apr 2011 14:36:34 +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>WordPress archives</title>
		<link>http://www.cs278.org/blog/2009/03/03/wordpress-archives/</link>
		<comments>http://www.cs278.org/blog/2009/03/03/wordpress-archives/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 05:11:32 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Site]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mods]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=451</guid>
		<description><![CDATA[I&#8217;ve been running my blog since late 2005 as such my archives had been getting a little bit unwieldy in the sidebar and stretching the page to extraordinary heights. I&#8217;ve reduced this clutter with some very small changes. First I &#8230; <a href="http://www.cs278.org/blog/2009/03/03/wordpress-archives/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running my blog since <a href="http://www.cs278.org/blog/2005/12/07/welcome/">late 2005</a> as such my archives had been getting a little bit unwieldy in the sidebar and stretching the page to extraordinary heights. I&#8217;ve reduced this clutter with some very small changes. First I dug around only to find out that WordPress doesn&#8217;t support fetching the monthly archives for one year, so I had to apply some filter foomongery. I discovered somebody else has done <a href="http://www.misthaven.org.uk/blog/2009/01/11/filtering-archives/" rel="external">something similar</a>, not quite as nice personally but it works.<br />
<span id="more-451"></span><br />
First I created a filter in my WordPress installation and added it.</p>
<pre>function getarchives_filter($where, $args)
{
	if (isset($args['year']))
	{
		$where .= ' AND YEAR(post_date) = ' . intval($args['year']);
	}
	return $where;
}
add_filter('getarchives_where', 'getarchives_filter', 10, 2);
</pre>
<p>Now the <a href="http://codex.wordpress.org/Template_Tags/wp_get_archives" rel="external"><code>wp_get_archives()</code></a> function supports a year parameter which restricts results to one particular year. Next we modify the sidebar to make use of this additional argument. Here is an example of the correct call to make:</p>
<pre>&lt;?php wp_get_archives('type=monthly&amp;year=' . get_the_time('Y', reset($GLOBALS['posts'])); ?&gt;</pre>
<p>This code also works properly when viewing the archives of a particular year, the months outputted change to the currently viewed year.</p>
<p>I have changed my own sidebar code to use this:</p>
<pre>
&lt;li&gt;&lt;h2&gt;Archives&lt;/h2&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;Months&lt;/strong&gt;
            &lt;ul&gt;
                    &lt;?php
                    // Use the current date when viewing a page, not the pages year
                    $year = (is_page()) ? date('Y') : get_the_time('Y', reset($GLOBALS['posts']));

                    wp_get_archives('type=monthly&amp;limit=12&amp;year[]=' . $year . (!is_archive() ? '&amp;year[]=' . ($year - 1) : ''));
                    ?&gt;
            &lt;/ul&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;Years&lt;/strong&gt;
            &lt;ul&gt;
                    &lt;?php wp_get_archives('type=yearly'); ?&gt;
            &lt;/ul&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
&lt;/li&gt;
</pre>
<p class="note"><strong>Updated 31/01/2010:</strong> Paul spotted a bug, the code used the date of the last post displayed on the page rather than the first.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2009/03/03/wordpress-archives/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Year Server Crash</title>
		<link>http://www.cs278.org/blog/2009/01/01/new-year-server-crash/</link>
		<comments>http://www.cs278.org/blog/2009/01/01/new-year-server-crash/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 13:21:49 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[sandman]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=436</guid>
		<description><![CDATA[My server for some reason unknown to me crashed last night, in the middle of new year festivities. Extracts from my logs show the, hopefully, coincidental timing of it. Dec 31 23:56:15 sandman rsnapshot[11655]: /usr/bin/rsnapshot -c /etc/rsnapshot.d/mail.cs278.org hourly: completed successfully &#8230; <a href="http://www.cs278.org/blog/2009/01/01/new-year-server-crash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My server for some reason unknown to me crashed last night, in the middle of new year festivities. Extracts from my logs show the, hopefully, coincidental timing of it.</p>
<blockquote><p><code>Dec 31 23:56:15 sandman rsnapshot[11655]: /usr/bin/rsnapshot -c /etc/rsnapshot.d/mail.cs278.org hourly: completed successfully<br />
<cs278> Jan  1 01:15:30 sandman syslogd 1.5.0#5: restart.</code></p></blockquote>
<p>Happy New Year to all! <img src='http://www.cs278.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2009/01/01/new-year-server-crash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Three Years Old</title>
		<link>http://www.cs278.org/blog/2008/12/07/three-years-old/</link>
		<comments>http://www.cs278.org/blog/2008/12/07/three-years-old/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 14:42:18 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=434</guid>
		<description><![CDATA[I know I started this blog in December 2005 but I wasn&#8217;t quite sure when, so I took a nose and it turns out it was December 7th which means this blog is three years old today. In three years &#8230; <a href="http://www.cs278.org/blog/2008/12/07/three-years-old/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I know I started this blog in <a href="http://www.cs278.org/blog/2005/12/">December 2005</a> but I wasn&#8217;t quite sure when, so I took a nose and it turns out it was <a href="http://www.cs278.org/blog/2005/12/07/welcome/">December 7<sup>th</sup></a> which means this blog is three years old today. In three years I have written 316 entries (including this one) which is an average of 8 a month which is pretty good, and I&#8217;ve never missed a month. <img src='http://www.cs278.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/12/07/three-years-old/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Home</title>
		<link>http://www.cs278.org/blog/2008/11/30/new-home/</link>
		<comments>http://www.cs278.org/blog/2008/11/30/new-home/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 16:16:12 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=409</guid>
		<description><![CDATA[My blog has a new home on a VPS hosted by Host Europe shared between me and a friend. It has a nice lean installation of Debian Lenny, running a variety of low profile or tuned applications to provide various &#8230; <a href="http://www.cs278.org/blog/2008/11/30/new-home/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My blog has a new home on a VPS hosted by <a href="http://www.hosteurope.de/" rel="external">Host Europe</a> shared between me and a <a href="http://nokarma.org/" rel="friend">friend</a>. It has a nice lean installation of Debian Lenny, running a variety of low profile or tuned applications to provide various services. We also have another 50MiB of free memory to play with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/11/30/new-home/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>October Desktop</title>
		<link>http://www.cs278.org/blog/2008/10/06/october-desktop-2/</link>
		<comments>http://www.cs278.org/blog/2008/10/06/october-desktop-2/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 22:34:34 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Desktops]]></category>
		<category><![CDATA[ktulu [Desktop]]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[screenshots]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=392</guid>
		<description><![CDATA[Another month, finally another desktop. I had been using the default one in Hardy for such a long time.]]></description>
			<content:encoded><![CDATA[<p>Another month, finally another desktop. I had been using the default one in Hardy for such a long time.</p>
<p><a href="http://www.cs278.org/gallery/v/screenshots/desktops/ktulu_cs278_org/2008-10-03.png.html"><img src="http://www.cs278.org/gallery/d/5366-4/2008-10-03.png" alt="October 2008 Desktop" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/10/06/october-desktop-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>June 2008 Desktop</title>
		<link>http://www.cs278.org/blog/2008/06/07/june-2008-desktop/</link>
		<comments>http://www.cs278.org/blog/2008/06/07/june-2008-desktop/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 12:53:00 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Desktops]]></category>
		<category><![CDATA[ktulu [Desktop]]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[screenshots]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=369</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cs278.org/gallery/v/screenshots/desktops/ktulu_cs278_org/2008-06-07.png.html?g2_imageViewsIndex=4"><img src="http://www.cs278.org/gallery/d/2854-4/2008-06-07.png" alt="Chris' June 2008 Desktop: Lake District" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/06/07/june-2008-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSLU2 &#8211; beast Fixed</title>
		<link>http://www.cs278.org/blog/2008/06/07/nslu2-beast-fixed/</link>
		<comments>http://www.cs278.org/blog/2008/06/07/nslu2-beast-fixed/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 12:08:17 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[beast]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[nslu2]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=368</guid>
		<description><![CDATA[One of my NSLU2&#8242;s went up the swanny two weeks back. Typically it was the one 80 miles away at home, that not only is my primary mail exchanger but also the DHCP server for my home network, chances are &#8230; <a href="http://www.cs278.org/blog/2008/06/07/nslu2-beast-fixed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of my <a href="http://en.wikipedia.org/wiki/NSLU2" re="external">NSLU2&#8242;s</a> went up the swanny two weeks back. Typically it was the one 80 miles away at home, that not only is my primary mail exchanger but also the DHCP server for my home network, chances are somebody might notice. Thankfully I have the ability to fail over DHCP onto sandman with a one line configuration change and a restart of dnsmasq, which I did.</p>
<p>Whilst I was at home this past week I got to work trying to work out what was up. The documentation in Debian about the LED sequences told me that it was getting stuck at the initramfs stage of boot. Basically it couldn&#8217;t load the actual operating system off the discs. This meant I would have to delve deep and play with the contents of the flash memory.</p>
<p>I mounted the USB sticks that I use as its discs on my server and extracted a copy of the current kernels and initramfs images that were on it. I also found the Debian installation flash firmware and set about hacking the two. I found some <a href="http://www.nslu2-linux.org/wiki/Debian/BuildImage" rel="external">instructions</a> on how to modify an existing image which is what I did. I swapped out the kernel and initramfs in the firmware for the latest ones on my discs and flashed the NSLU2. Same thing happened! So I then set about using the previous kernel version which worked like a charm. For now I have removed the new kernel from it and forced it to keep the old version. I will look into updating it when I have a little more time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/06/07/nslu2-beast-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>May 2008 Desktop</title>
		<link>http://www.cs278.org/blog/2008/05/11/may-2008-desktop/</link>
		<comments>http://www.cs278.org/blog/2008/05/11/may-2008-desktop/#comments</comments>
		<pubDate>Sun, 11 May 2008 18:40:40 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Desktops]]></category>
		<category><![CDATA[ktulu [Desktop]]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[screenshots]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=366</guid>
		<description><![CDATA[A new month a new desktop wallpaper:]]></description>
			<content:encoded><![CDATA[<p>A new month a new desktop wallpaper:</p>
<p><a href="http://www.cs278.org/gallery/v/screenshots/desktops/ktulu_cs278_org/2008-05-09.png.html?g2_imageViewsIndex=4"><img src="http://www.cs278.org/gallery/d/2794-2/2008-05-09.png" alt="Chris' May 2008 Desktop: Bamburgh Castle" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/05/11/may-2008-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I forgot&#8230;</title>
		<link>http://www.cs278.org/blog/2008/04/28/i-forgot/</link>
		<comments>http://www.cs278.org/blog/2008/04/28/i-forgot/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 01:32:02 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Desktops]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[ktulu [Desktop]]]></category>
		<category><![CDATA[holidays]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[last.fm]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=361</guid>
		<description><![CDATA[&#8230; about this. Well more likely is I am just being too lazy. But it has been quite a while since I wrote anything of much substance up here, currently I am unable to sleep which sucks somewhat. I&#8217;ve been &#8230; <a href="http://www.cs278.org/blog/2008/04/28/i-forgot/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; about this. Well more likely is I am just being too lazy. But it has been quite a while since I wrote anything of much substance up here, currently I am unable to sleep which sucks somewhat. I&#8217;ve been very busy as of late, I&#8217;ve finished my quite frankly ludicrous 5 week &#8220;Easter&#8221; &#8220;break&#8221; where I did not much but work, bum around, and drove places. So I am back at the grindstone that is university, ploughing through coursework at such a rate I guess I could describe as &#8220;relaxed&#8221; but that maybe pushing definition boundaries. I&#8217;m looking forward to next week when the last of my coursework is handed in and I am free to revise for exams, oh heck!</p>
<p>I&#8217;ve had a new desktop for the latter part of April inspired by a trip to <a href="http://www.westons-cider.co.uk/" rel="external">Weston&#8217;s Cider</a> of Much Marcle, Herefordshire over me holiday.</p>
<p><a href="http://www.cs278.org/gallery/v/screenshots/desktops/ktulu_cs278_org/2008-04-16.png.html"><img src="http://www.cs278.org/gallery/d/2778-4/2008-04-16.png" alt="Chris' Desktop" /></a></p>
<p>I am moving towards a landmark on <a href="http://www.last.fm/user/cstoonarmy/" rel="me">last.fm</a>, 100 000 tracks played. Not decided what will be my 100 000th track hopefully I don&#8217;t go over it by mistake with something non-worthy.</p>
<p>I leave you with the thought, why would a dairy company write &#8220;Allergy information: contains milk&#8221; on the side of a bottle of milk? Surely that is the whole idea? Or maybe I am missing something&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/04/28/i-forgot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Upgrade</title>
		<link>http://www.cs278.org/blog/2008/03/30/wordpress-upgrade-4/</link>
		<comments>http://www.cs278.org/blog/2008/03/30/wordpress-upgrade-4/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 20:53:47 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Site]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.cs278.org/blog/?p=356</guid>
		<description><![CDATA[I am currently enjoying the visual refresh WordPress has been given in version 2.5. Its quite cool.]]></description>
			<content:encoded><![CDATA[<p>I am currently enjoying the visual refresh <a href="http://www.wordpress.org/" rel="external">WordPress</a> has been given in version 2.5. Its quite cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs278.org/blog/2008/03/30/wordpress-upgrade-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

