<?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>KrisWillis.com</title>
	<atom:link href="http://www.kriswillis.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kriswillis.com</link>
	<description></description>
	<lastBuildDate>Fri, 02 Jul 2010 13:10:08 +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>Revo 3610 HTPC</title>
		<link>http://www.kriswillis.com/index.php/2010/06/27/revo-3610-htpc/</link>
		<comments>http://www.kriswillis.com/index.php/2010/06/27/revo-3610-htpc/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 16:23:55 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[GNU Linux]]></category>
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://www.kriswillis.com/?p=124</guid>
		<description><![CDATA[I store all of my media on a file server (running Ubuntu Server 10.04) which currently contains a 6TB RAID5 array, then stream whatever I want to watch to a client device hooked up to my TV, up until yesterday this was a Popcorn Hour A-110. Although the A-110 plays back almost anything I throw [...]]]></description>
			<content:encoded><![CDATA[<p>I store all of my media on a file server (running Ubuntu Server 10.04) which currently contains a 6TB RAID5 array, then stream whatever I want to watch to a client device hooked up to my TV, up until yesterday this was a Popcorn Hour A-110. Although the A-110 plays back almost anything I throw at it, and generally flawlessly, the navigation is not the best, the UI is not the prettiest to look at and the network functionality is pretty slow. I&#8217;ve had my eye on <a title="Boxee" href="http://boxee.tv" target="_blank">Boxee</a> for a while now and have been patiently waiting for the release of the <a title="Boxee Box" href="http://boxee.tv/box" target="_blank">Boxee Box</a>, but they&#8217;ve recently announced on their blog that it has been delayed until November 2010 for the US release, and no mention of the Europe release. With this in mind, I decided to run Boxee on a low powered HTPC.</p>
<p>A couple of people in both forums and IRC have recommended the Acer Aspire Revo 3610 net-top machine as a candidate for running Boxee, so after a little research I picked on up from eBuyer at a bargain £180 for the N330 / 2GB / 250GB / Linpus configuration, delivered the next day for free. After firing it up for the first time, I spent less than 5 minutes poking around the pre-installed Linpus out of curiosity (the 250GB disk was oddly configured with a single 10GB partition), then promptly wiped it and installed Ubuntu 10.04 (x64) and the latest Boxee release.</p>
<p>Having previously read <a href="http://www.greenhughes.com/content/boxee-and-ubuntu-1004-lts-acer-aspire-revo" target="_blank">Liam Green-Hughes&#8217; website</a>, I was aware that I needed to tweak some settings to get the digital sound working, though there was a slight difference with my Revo in that I have three different S/PDIF levels within alsamixer &#8211; &#8220;S/PDIF&#8221;, &#8220;S/PDIF Default PCM&#8221; and &#8220;S/PDIF 1&#8243;. I un-muted all  of them but have yet to experiment to see what each of them does. I set my output device to &#8220;Digital Stereo (IEC958) Output&#8221; within the Ubuntu sound configuration as I want the audio to be sent to my amp over S/PDIF for decoding; after messing around with a few different combinations of settings within Boxee I was getting sound for files encoded with normal stereo sound, but silence for anything with multiple channels (DD / DTS). After a couple of hours of tinkering and research, it turns out that pulseaudio has a default sample rate of 44.1kHz and <a title="Ubuntu Forums" href="http://ubuntuforums.org/showpost.php?p=7560563&amp;postcount=3" target="_blank">AC3 (Dolby Digital) is signed 16-bit little-endian 2-channel 48kHz PCM data</a>, configuring pulseaudio to run with a sample rate of 48kHz appears to have fixed the issue, as I am now getting DD and DTS passed to my amp for every media file I have tested.</p>
<p>After playing around with the Revo / Boxee combination for about a day, it&#8217;s generally all positive; it plays back 720p/1080p content perfectly by passing the majority of the HD video decoding to the ION chip with the help of VDPAU available within GNU/Linux, the CPU is running at ~10% during all of this while managing perfectly with non-HD content too but with a little more strain on the N330. While &#8220;idling&#8221; on the Boxee home screen, one of the CPU&#8217;s threads is curiously always running at 100% load, though it is possible it is still indexing all of my media with it reporting &#8220;identifying&#8221; next to one of my sources. It has currently successfully identified 99% of my media requiring me to manually identify a handful of files, but this is perfectly acceptable considering the brilliant interface complete with covers and descriptions for all of my movies and TV shows. There is a slightly annoying wait when switching between the different areas of Boxee and sometimes a slight bit of lag when browsing through the media, but this could be down to it still indexing the content.</p>
<p>There appears to be plenty more to play with such as web content and applications, from what I have looked at, Flash video plays back fine in standard definition but HD Flash content is completely unwatchable &#8211; This is likely down to the lack of 64bit Linux support from Adobe. Other web based content such as the video made available within the Revision 3 application plays back perfectly, I&#8217;m pretty sure it&#8217;s HD too, but I couldn&#8217;t find an option to switch between the different encodings of their content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2010/06/27/revo-3610-htpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forex Trading</title>
		<link>http://www.kriswillis.com/index.php/2010/06/23/forex-trading/</link>
		<comments>http://www.kriswillis.com/index.php/2010/06/23/forex-trading/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 11:10:20 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kriswillis.com/?p=122</guid>
		<description><![CDATA[In the past couple of months I have been trying my hand at trading currencies on the the foreign exchange market, with the ultimate end goal of supplementing my income; I&#8217;m fully aware that there are potentially large risks involved with highly leveraged trading and that this is not some kind of get rich quick [...]]]></description>
			<content:encoded><![CDATA[<p>In the past couple of months I have been trying my hand at trading currencies on the the foreign exchange market, with the ultimate end goal of supplementing my income; I&#8217;m fully aware that there are potentially large risks involved with highly leveraged trading and that this is not some kind of get rich quick scheme! However, the initial aim is to start small; get a feel for trading with a demo account, then move onto trading small amounts of money when I get the hang of things.</p>
<p>Instead of mixing in posts about Forex on this geekish site, I have set-up a separate one &#8211; <a title="Forex trading" href="http://startingforex.co.uk" target="_blank">Starting Forex</a> &#8211; that I&#8217;ll be using to document my findings and things that I have learnt, mainly to remind myself of stuff, and I find I get a better understanding of a subject if I write down what I learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2010/06/23/forex-trading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shorten URLs and post to Twitter with PHP and cURL</title>
		<link>http://www.kriswillis.com/index.php/2009/10/09/shorten-urls-and-post-to-twitter-with-php-and-curl/</link>
		<comments>http://www.kriswillis.com/index.php/2009/10/09/shorten-urls-and-post-to-twitter-with-php-and-curl/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 14:41:51 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=109</guid>
		<description><![CDATA[I recently had the task of automatically &#8220;tweeting&#8221; when a new article was posted to one of the websites I had built, it turns out to be a pretty simple operation thanks to both Twitter and Bit.ly providing a straight forward API. An account with Bit.ly does have to be opened to obtain an API [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the task of automatically &#8220;tweeting&#8221; when a new article was posted to one of the websites I had built, it turns out to be a pretty simple operation thanks to both Twitter and Bit.ly providing a straight forward API. An account with Bit.ly does have to be opened to obtain an API key.</p>
<p>I decided to use the built-in cURL functionality of PHP for interacting with the APIs. This code uses some of the JSON functions introduced in PHP 5.2.0 so a recent install of PHP is required as the Bit.ly API responds with a JSON string. On to the code&#8230;<br />
<span id="more-109"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> shorten_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$long_url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$login</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$api</span>   <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;api key&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$long_url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$shortener</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://api.bit.ly/shorten?version=2.0.1&amp;longUrl=<span style="color: #006699; font-weight: bold;">{$long_url}</span>&amp;login=<span style="color: #006699; font-weight: bold;">{$login}</span>&amp;apiKey=<span style="color: #006699; font-weight: bold;">{$api}</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$shortener</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HEADER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_FOLLOWLOCATION<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_TIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$json</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$json</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'statusCode'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;OK&quot;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$json</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'results'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$long_url</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'shortUrl'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> twitter<span style="color: #009900;">&#40;</span><span style="color: #000088;">$status</span><span style="color: #339933;">,</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$status</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$limit</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">140</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$short</span> <span style="color: #339933;">=</span> shorten_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$length</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$limit</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$short</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$status</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> ? <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$status</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;... &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$short</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$status</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$short</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://twitter.com/statuses/update.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HEADER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_FOLLOWLOCATION<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_TIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_USERPWD<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$username}</span>:<span style="color: #006699; font-weight: bold;">{$password}</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;status=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$status</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000088;">$p</span> <span style="color: #339933;">=</span> <span style="color: #990000;">xml_parser_create</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">xml_parse_into_struct</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #339933;">,</span> <span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vals</span><span style="color: #339933;">,</span> <span style="color: #000088;">$index</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">xml_parser_free</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$vals</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tag'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;STATUS&quot;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2009/10/09/shorten-urls-and-post-to-twitter-with-php-and-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mt-daapd transcoding failed after upgrading to Jaunty</title>
		<link>http://www.kriswillis.com/index.php/2009/07/26/mt-daapd-transcoding-failed-after-upgrading-to-jaunty/</link>
		<comments>http://www.kriswillis.com/index.php/2009/07/26/mt-daapd-transcoding-failed-after-upgrading-to-jaunty/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 17:33:13 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[GNU Linux]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=104</guid>
		<description><![CDATA[After upgrading my media server to Jaunty recently I noticed that I could no longer play FLAC files from within iTunes under OS X. I couldn&#8217;t figure out why this was happening, but to solve it I configured mt-daapd to handle the transcoding with a script rather than with ffmpeg. There are a few small [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading my media server to Jaunty recently I noticed that I could no longer play FLAC files from within iTunes under OS X. I couldn&#8217;t figure out why this was happening, but to solve it I configured mt-daapd to handle the transcoding with a script rather than with ffmpeg.</p>
<p>There are a few small issues that don&#8217;t make this reconfiguration as straight forward as you would hope. First of all, the required script (mt-daapd-ssc.sh) is not installed along with mt-daapd, so I had to pull it from the svn repository and drop it into /usr/bin. Also, mt-daapd-ssc.sh uses wavstreamer to encode the decoded FLAC file, so if that isn&#8217;t available on your system, you&#8217;ll need to install that too. I believe it is built along with the rest of mt-daapd when building from source.</p>
<p>Next up, mt-daapd.conf needs to be modified to change how the transcoding is handled, the following lines need to be uncommented:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ssc_prog = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mt-daapd-ssc.sh
ssc_codectypes = ogg,flac,alac</pre></div></div>

<p>The following line needs the ssc-ffmpeg.so part removed:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">plugins = rsp.so,ssc-ffmpeg.so</pre></div></div>

<p>At this stage, I thought that this was all that was required, but I still couldn&#8217;t get it working. Upon searching the Ubuntu Forums, someone else had already been through this and pointed out that one component of this set-up (I&#8217;m unsure which) requires an older version of FLAC, so a symlink had to be created.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libFLAC.so.8.2.0 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libFLAC.so.7</pre></div></div>

<p>After restarting mt-daapd, iTunes was again playing FLAC files!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2009/07/26/mt-daapd-transcoding-failed-after-upgrading-to-jaunty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a printer within Ubuntu</title>
		<link>http://www.kriswillis.com/index.php/2009/04/01/adding-a-printer-within-ubuntu/</link>
		<comments>http://www.kriswillis.com/index.php/2009/04/01/adding-a-printer-within-ubuntu/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 10:49:05 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[GNU Linux]]></category>
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=100</guid>
		<description><![CDATA[One of our office printers decided to die the other day, a Brother multi-function laser printer, which I recall took quite a lot of messing around to get it printing from Ubuntu and once it was set-up it always took a while to send pages to the printer. Sometimes, it printed just a bunch of [...]]]></description>
			<content:encoded><![CDATA[<p>One of our office printers decided to die the other day, a Brother multi-function laser printer, which I recall took quite a lot of messing around to get it printing from Ubuntu and once it was set-up it always took a while to send pages to the printer. Sometimes, it printed just a bunch of garbage instead of the document I sent too.</p>
<p>Our new printer, an HP 2727nf MFP, was a completely different experience. After hooking it up to the network and selecting to add a new printer within Ubuntu, it searched for printers, found the new HP, fetched and installed the required drivers and <em>just worked</em>! Pages are sent to the printer almost immediatly and have printed perfectly every time, so far.</p>
<p>Also, I set the same printer up on 6 machines in the office, 1 x Ubuntu, 2 x Xubuntu, 1 x OS X, 1 x Vista, 1 x XP Pro. By the time it was set-up on the first Windows machine I had already completed the set-up on all three Linux machines &#8211; Two thumbs up for Ubuntu and HP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2009/04/01/adding-a-printer-within-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overview of open tickets across multiple trac environments</title>
		<link>http://www.kriswillis.com/index.php/2009/02/26/overview-of-open-tickets-across-multiple-trac-environments/</link>
		<comments>http://www.kriswillis.com/index.php/2009/02/26/overview-of-open-tickets-across-multiple-trac-environments/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 10:26:20 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=86</guid>
		<description><![CDATA[I&#8217;ve recently started using Trac internally for managing the ever growing list of projects that I have built and am responsible for maintaining. There is currently no feature within Trac for displaying a list of all the environments and how many open tickets each one has, and I&#8217;m guessing this is down to the fact [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently started using <a href="http://trac.edgewall.org">Trac</a> internally for managing the ever growing list of projects that I have built and am responsible for maintaining. There is currently no feature within Trac for displaying a list of all the environments and how many open tickets each one has, and I&#8217;m guessing this is down to the fact that each environment has it&#8217;s own SQLite database.</p>
<p>However, browsing the root of the Trac install does give a list of all the available environments, and there are RSS feeds available for any of the reports that have been created. So I wrote a quick script to pull information from both of these resources and display a list of all available environments and how many open tickets each one has. <span id="more-86"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;head&gt;
        &lt;title&gt;Available Projects&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;magpierss-0.72/rss_fetch.inc&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$root</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://trac.kris&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$root</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>\/([a-z0-9_-]+)<span style="color: #000099; font-weight: bold;">\&quot;</span>.*&gt;(.*)&lt;\/a&gt;/i&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$c</span><span style="color: #339933;">,</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;h1&gt;Available Projects&lt;/h1&gt;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$rss</span> <span style="color: #339933;">=</span> fetch_rss<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$root</span>/<span style="color: #006699; font-weight: bold;">$v</span>/report/1?format=rss&amp;USER=kris&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;li&gt;&lt;a href='<span style="color: #006699; font-weight: bold;">$root</span>/<span style="color: #006699; font-weight: bold;">$v</span>/report/1'&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt; (&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">items</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;)&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2009/02/26/overview-of-open-tickets-across-multiple-trac-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boss SD-1 not switching off</title>
		<link>http://www.kriswillis.com/index.php/2008/09/27/boss-sd-1-not-switching-off/</link>
		<comments>http://www.kriswillis.com/index.php/2008/09/27/boss-sd-1-not-switching-off/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 15:17:01 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Guitar]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=64</guid>
		<description><![CDATA[Although I hardly use my SD-1, due to my GT-8 having all of the overdrive settings I could possibly want, it was still annoying me that I had a faulty pedal sitting on my shelf. The problem I was experiencing was that the SD-1 was constantly stuck in its on position &#8211; Stomping on it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://kriswillis.com/wp-content/uploads/2008/09/dscn0677.jpg"><img src="http://kriswillis.com/wp-content/uploads/2008/09/dscn0677.jpg" border="1" alt="SD-1 Inside" width="150" align="right" /></a>Although I hardly use my SD-1, due to my GT-8 having all of the overdrive settings I could possibly want, it was still annoying me that I had a faulty pedal sitting on my shelf. The problem I was experiencing was that the SD-1 was constantly stuck in its on position &#8211; Stomping on it did nothing but continue with the overdrive.</p>
<p>After taking it apart and hooking it back up to some power, a guitar and an amp, in its disassembled state it was working fine &#8211; Reassemble and the fault reappears. It was instantly obvious that something was shorting out against the metal casing. You&#8217;d have thought that there was some form of non-conductive coating on the base-plate &#8211; Maybe there is, but defective near the switching area of the circuit. Covering the base-plate with insulation tape fixed the issue and it&#8217;s now working perfectly again!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2008/09/27/boss-sd-1-not-switching-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SiI-3114 and Ubuntu</title>
		<link>http://www.kriswillis.com/index.php/2008/09/18/sii-3114-and-ubuntu/</link>
		<comments>http://www.kriswillis.com/index.php/2008/09/18/sii-3114-and-ubuntu/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 20:43:44 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[GNU Linux]]></category>
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=62</guid>
		<description><![CDATA[My media server was getting to the stage where it required some extra discs, so I purchased another pair of 500GB SATA disks and a SiI-3114 based PCI to 4-port SATA controller card to hook them up to as I was out of spare SATA ports. Upon booting there was no sign of the cards [...]]]></description>
			<content:encoded><![CDATA[<p>My media server was getting to the stage where it required some extra discs, so I purchased another pair of 500GB SATA disks and a SiI-3114 based PCI to 4-port SATA controller card to hook them up to as I was out of spare SATA ports.</p>
<p>Upon booting there was no sign of the cards BIOS during POST and no sign of the disks attached to it either after booting into Ubuntu, though running <em>lspci</em> reported that the card was present. After poking around with a mixture of Google and the Ubuntu forums, a number of people were having issues with the card but no conclusive fix had been found.</p>
<p>So I head on over to the Silicon Image website to check if there are any new BIOS images available, and surprisingly there was! After downloading, and realising that the only flash tool available was DOS based along with my server not having a floppy drive or a CD drive to boot into a DOS shell with I managed to get a USB stick booting into DOS with the flash tool.</p>
<p>To cut the story short &#8211; Flashing the card with the latest non-RAID version of the BIOS fixed my issue. It was now displaying the BIOS upon boot, and the attached disks were visible when running <em>lshw -C disk</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2008/09/18/sii-3114-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing the microphone in a Blackberry 8800</title>
		<link>http://www.kriswillis.com/index.php/2008/08/10/replacing-the-microphone/</link>
		<comments>http://www.kriswillis.com/index.php/2008/08/10/replacing-the-microphone/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 12:52:05 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=56</guid>
		<description><![CDATA[So I accidentally spilled a cup of tea over my Blackberry. Fortunately, after drying it off most of it worked perfectly bar one of the most important components in a mobile phone &#8211; The microphone. After doing a little research, it turns out that the mic is surface mounted to the keyboard PCB so to [...]]]></description>
			<content:encoded><![CDATA[<p>So I accidentally spilled a cup of tea over my Blackberry. Fortunately, after drying it off most of it worked perfectly bar one of the most important components in a mobile phone &#8211; The microphone.</p>
<p>After doing a little research, it turns out that the mic is surface mounted to the keyboard PCB so to replace the mic I&#8217;d need a new (or working) keyboard PCB. The only place I could find this component new was on some American website, which after shipping and other taxes involved in importing stuff, would have cost about £70. Or, I could have sent it off to Vodafone for repair at a cost of £60 and a few weeks Blackberry-less no doubt.</p>
<p>I ended up grabbing what was described as a faulty 8800 from someone on eBay for about £40, the description said it had a software fault, so there was a good chance that the hardware was in good condition. It turns out that there was nothing wrong with it from what I could gather after messing around with it for a couple of minutes. But it was on the o2 network, so no use to me.<span id="more-56"></span></p>
<p>After disassembling one of my 8800s it turns out that the keyboard PCB is somehow permanently fixed to the chassis. I made several attempts to split the two apart, but was concerned as to how functional the PCB would have been afterwards, and how I was going to mount the replacement. I&#8217;m assuming that if I were to order the replacement part from America, it would arrive mounted to the chassis. The only issue with this, is that the sticker with the serial number, IMEI, BT MAC etc. is also permanently stuck to the back of the chassis.</p>
<p>There isn&#8217;t <em>too much</em> work involved in taking one of these things apart. After removing the battery, MicroSD card and sim card out there are four Torx T5 (or T4 &#8211; My precision Torx drivers aren&#8217;t marked) screws to remove. After removing the two chrome plastic side plates, which are just clipped on, the back cover comes off with a bit of jiggling.</p>
<p>After removing the back cover, there are a further two T5 screw to remove near the top which releases the clipped on front cover and keypad. At the bottom there is then a plastic cover that just pulls off, underneath is a small PCB which looks like it contains some form of antenna, possibly GPRS/EDGE based on what was printed on the cover.</p>
<p>The next task is to remove the frame that the loudspeaker is mounted to. This frame is just clipped on with two clips either side, and two clips at the top. There is also a wire linking the main board to the antenna board which is clipped to the frame, it&#8217;s easiest to unplug the wire at each end before removing the frame.</p>
<p>After the frame is removed, the main PCB should be fairly easy to remove after unplugging the ribbon cables from the display and keyboard. Flip the chassis over and remove the display by firmly pulling it away from the metal backing plate, it is only held on with an adhesive pad. At this stage I got the second 8800 to the same stage, and reassembled my original phone around the chassis with the working keyboard mounted to it. It&#8217;s always worth checking that it is functioning before putting it back in its casing &#8211; You don&#8217;t want to put it all back together only to find there is a bad connection somewhere!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2008/08/10/replacing-the-microphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logitech MX5000 and Ubuntu</title>
		<link>http://www.kriswillis.com/index.php/2008/05/09/logitech-mx5000-and-ubuntu/</link>
		<comments>http://www.kriswillis.com/index.php/2008/05/09/logitech-mx5000-and-ubuntu/#comments</comments>
		<pubDate>Fri, 09 May 2008 19:59:58 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[GNU Linux]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Logitech]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://kriswillis.com/?p=54</guid>
		<description><![CDATA[Since I first bought my Logitech MX5000 combo it has never worked correctly on Ubuntu (back to 6.06 maybe&#8230;) after booting. The keyboard would work perfectly in the BIOS and even in GRUB, but as soon as I reached the (GUI) log-in screen my MX5000 would become unresponsive until I disconnected the USB Bluetooth receiver [...]]]></description>
			<content:encoded><![CDATA[<p>Since I first bought my Logitech MX5000 combo it has never worked correctly on Ubuntu (back to 6.06 maybe&#8230;) after booting. The keyboard would work perfectly in the BIOS and even in GRUB, but as soon as I reached the (GUI) log-in screen my MX5000 would become unresponsive until I disconnected the USB Bluetooth receiver and plugged it back in. As you could imagine, quite tedious on every boot.</p>
<p>After doing a bit of research, this appears to be a fairly common issue. One suggestion that did work for me was to remove the bluez-* packages, but apparently there is the side effect of other Bluetooth devices no longer working. This isn&#8217;t an issue for me, so it&#8217;ll keep me happy until a real fix is in place.</p>
<p>Drop the following into your CLI if you&#8217;re having the same issue&#8230;<br />
<code>sudo apt-get remove bluez-cups bluez-pcmcia-support bluez-pin bluez-utils</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kriswillis.com/index.php/2008/05/09/logitech-mx5000-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
