<?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>CGarvey&#039;s Blog</title>
	<atom:link href="http://cgarvey.ie/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://cgarvey.ie/blog</link>
	<description>The personal blog of Irish mobile and web application developer, Cathal Garvey</description>
	<lastBuildDate>Sun, 06 May 2012 23:34:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Installing Indefero on Ubuntu Precise Pangolin</title>
		<link>http://cgarvey.ie/blog/archive/2012/05/06/installing-indefero-on-ubuntu-precise-pangolin/</link>
		<comments>http://cgarvey.ie/blog/archive/2012/05/06/installing-indefero-on-ubuntu-precise-pangolin/#comments</comments>
		<pubDate>Sun, 06 May 2012 23:34:18 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=468</guid>
		<description><![CDATA[Indefero is an open-source Git hosting web app, built on PHP (using the PLUF framework) and MySQL. I use it for some clients because it is shared hosting friendly (no need to set up Ruby on Rails or daemons, as with Gitorious). Here&#8217;s a quick guide to installing it on the latest (as of time [...]]]></description>
			<content:encoded><![CDATA[<p>Indefero is an open-source Git hosting web app, built on PHP (using the <a title="PLUF PHP web application framework" href="http://www.pluf.org/">PLUF</a> framework) and MySQL. I use it for some clients because it is shared hosting friendly (no need to set up Ruby on Rails or daemons, as with Gitorious). Here&#8217;s a quick guide to installing it on the latest (as of time of writing) Ubuntu release, Precise Pangolin v12.04 LTS.</p>
<p>Conveniently, someone (<a href="https://launchpad.net/~shockflash">shockflash</a>) has packaged Indefero for Ubuntu installation. As of time of writing, these packages were limited to Ubuntu Lucid Lynx v10.04, so there&#8217;s a couple of extra steps, but the install process is still relatively painless.</p>
<p>On a basic Ubuntu 12.04 install, I opted to enable the LAMP package set (which installs MySQL, PHP, and Apache web server all needed by Indefero). If you are installing on an existing Ubuntu server machine, you just need to install <code>apache2</code>, <code>mysql-server</code>, and various php5 packages.</p>
<ol>
<li>
		<strong>Install Indefero package</strong></p>
<ul>
<li>Make sure to have MySQL (server) installed in advance, along with apache2.</li>
<li>As per the instructions on <a href="https://launchpad.net/~shockflash/+archive/indefero">this Launchpad page</a>, you add their repository: <code class="cdBlock">sudo add-apt-repository ppa:shockflash/indefero</code></li>
<li>A quick edit of <code>/etc/apt/sources.list.d/shockflash-indefero-precise.list</code> and change the <code>precise</code> to <code>lucid</code>. This hack just tells apt to use the packages for the older lucid install (as these are the most recent packages available at the moment.</li>
<li>Update your repository cache by using <code>apt-get update</code>, or &#8220;u&#8221; within <code>aptitude</code></li>
<li>Finally, install the packages added by this new repository. If your software was fully up to date, then you should see 5 new packages available to install. These packages are <code>indefero</code>, <code>pluf</code>, and any/all of the 3 other scm-specific packages <code>indefero-git</code>, <code>indefero-hg</code>, <code>indefero-svn</code>, as needed.</li>
</ul>
</li>
<li>
		<strong>Configuration</strong></p>
<ul>
<li>As noted during the install, the default admin login details are <strong>admin</strong> / <strong>pass</strong></li>
<li>These packages automatically install at <code>&lt;your_server_hostname&gt;/indefero/</code>, though you may want to set up a more specific arrangement using virtual hosts, etc.</li>
</ul>
</li>
<li>
		<strong>Potential Apache config issue</strong></p>
<ul>
<li>There&#8217;s one slight issue that I found on a few installs. That is that the Indefero CRON script for synchronising Git keys breaks because it can&#8217;t determine the hostname (correctly, or at all). This means that after adding valid user SSH keys in Indefero, these keys won&#8217;t work because the cron script never gets to add them to the git user&#8217;s authorised keys. This problem also surfaces when you start/restart/configtest apache2 and get the message <code>apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName</code>. To fix this, simply fix your apache configuration! If you are not using virtual hosts, you can fix the base Ubuntu install by just adding <code>ServerName &lt;your server hostname&gt;</code> (or even <code>ServerName &lt;localhost&gt;</code>) at the start of the <code>/etc/apache2/apache2.conf</code></li>
</ul>
</li>
<li>
		<strong>First steps using Indefero (Git)</strong></p>
<ul>
<li>Login as the default admin user</li>
<li>Create a new user, and add an SSH (private) key for that user. Of course, you can have that new user login and provide their own SSH key.</li>
<li>Create a new project, and add your new user to the team</li>
<li>You can follow the instructions on the project page for creating a new repository, or you can upload an existing repository as follows:<code class="cdBlock"># You probably want to remove any existing 'remote' (like GitHub,<br />
# Gitorious, or your own SCM hosting). If so...</p>
<p># List any existing remotes<br />
git remote<br />
# Remove any remote. Likely called 'origin', or whatever<br />
# is listed above.<br />
git remote rm origin</p>
<p># Now add your Indefero project as a remote<br />
git remote add origin git@&lt;your server hostname&gt;:&lt;your project name&gt;.git<br />
# For example, if your server is 'scm' and your new project is 'test'...<br />
git remote add origin git@scm:test.git</p>
<p># Push your repository to its new origin, or home, on Indefero<br />
# in the 'master' branch.<br />
git push origin master</p>
<p># Thereafter, you can simply push any changes with<br />
git push<br />
</code></li>
</ul>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2012/05/06/installing-indefero-on-ubuntu-precise-pangolin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python iCalendar module, Google Calendar, and the case of the missing whitespace!</title>
		<link>http://cgarvey.ie/blog/archive/2012/05/02/python-icalendar-module-google-calendar-and-the-case-of-the-missing-whitespace/</link>
		<comments>http://cgarvey.ie/blog/archive/2012/05/02/python-icalendar-module-google-calendar-and-the-case-of-the-missing-whitespace/#comments</comments>
		<pubDate>Wed, 02 May 2012 00:47:41 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=458</guid>
		<description><![CDATA[TL;DR Update your icalendar module to the latest (beta) build. As the title suggests, if you&#8217;re having the same issue I had where Google Calendar seemingly deleted random spaces between words, on an imported calendar (iCal/.ics file) generated by the python icalendar module, then read on! Versions 3.0 (which is, in itself, recent), and older, [...]]]></description>
			<content:encoded><![CDATA[<p><em>TL;DR Update your icalendar module to the latest (beta) build.</em></p>
<p>As the title suggests, if you&#8217;re having the same issue I had where Google Calendar seemingly deleted random spaces between words, on an imported calendar (iCal/.ics file) generated by the python <a title="Python iCalendar on GitHub" href="https://github.com/collective/icalendar/">icalendar</a> module, then read on!</p>
<p>Versions 3.0 (which is, in itself, recent), and older, of this module correctly wrapped long lines in the generated iCal file. However, they also incorrectly stripped whitespace from the end of lines in that wrapping, or folding, process. The <a title="iCalendar RFC" href="http://www.ietf.org/rfc/rfc2445.txt">iCal spec</a> does call for wrapping of long lines, and specifically sets out that the next line should start with a space.</p>
<p>So, whilst it looks line a wrapped line has the correct whitespace between words, the first space character of the second/subsequent line isn&#8217;t part of the text. The previous line (assuming the wrapping has been performed nicely between two words) should end with a space; which, crucially, was being deleted in error. The result is Google Calendar correctly removes the space at the start of the second line (it being part of the protocol), leaving the last word on line 1 and the first word on line 2 to now be joined. The raw iCal file can be deceiving in that case, trust me!</p>
<p>To fix this, simply update to the latest version (a v3.1.x, or directly from source). If you can&#8217;t do that (for reasons other than file permissions!), you can also edit the offending line in <code>icalendar/parser.py</code>. Search for <code><a title="Link to specific line on latest source version, on GitHub" href="https://github.com/collective/icalendar/blob/master/src/icalendar/parser.py#L42">drop_whitespace</a></code> and change it from <code>True</code> to <code>False</code>. A simple fix, when you know how! If that still doesn&#8217;t work, make sure to remove any older/conflicting versions of the module, and to restart the server/script that&#8217;s using it.</p>
<p><strong>Update</strong>: Of course you were not using the original, and now obsolete, <a title="Old python iCalendar module page" href="http://codespeak.net/icalendar/">codespeak.net/icalendar/</a> page, were you? Of course not, but do note it&#8217;s now under active development again (with the blessing of original authors) at <a title="Python iCalendar on GitHub" href="https://github.com/collective/icalendar/">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2012/05/02/python-icalendar-module-google-calendar-and-the-case-of-the-missing-whitespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac keyboard, Ubuntu Synergy server, and Mac Synergy client</title>
		<link>http://cgarvey.ie/blog/archive/2011/06/23/mac-keyboard-ubunty-synergy-server-and-mac-synergy-client/</link>
		<comments>http://cgarvey.ie/blog/archive/2011/06/23/mac-keyboard-ubunty-synergy-server-and-mac-synergy-client/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 18:45:09 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[synergy]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=447</guid>
		<description><![CDATA[This post serves to highlight just how awkward my setup is, and as a guide to help with anyone with a similar setup (all 3 of you, worldwide). I&#8217;ve recently started using Synergy to control my Macbook from my Ubuntu (10.04, if that turns out to matter!) desktop. However, I use the slim Apple USB [...]]]></description>
			<content:encoded><![CDATA[<p>This post serves to highlight just how awkward my setup is, and as a guide to help with anyone with a similar setup (all 3 of you, worldwide).</p>
<p>I&#8217;ve recently started using <a href="http://synergy-foss.org/" title="Link to Synergy project website">Synergy</a> to control my Macbook from my Ubuntu (10.04, if that turns out to matter!) desktop. However, I use the slim Apple USB keyboard on my Ubuntu desktop (a subject of previous posts here). They key mappings for Alt and Command on my Mac were reversed when I was controlling the Macbook. I.e. the Apple keyboard wasn&#8217;t being reported as such to the operating system. Here&#8217;s a snippet from the synergy configuration file showing the swap to make the Apple keyboard work as expected on a Mac Synergy client. If you use QuickSynergy, the config file is in <code>~/.quicksynergy/synergy.conf</code>.</p>
<p><code class="cdBlock">section: screens<br />
	ubuntu-synserver:<br />
	macbook-synclient:<br />
		alt = super<br />
		super = alt<br />
end<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2011/06/23/mac-keyboard-ubunty-synergy-server-and-mac-synergy-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Irish-friendly keyboard layout for an Apple aluminium USB keyboard on Ubuntu</title>
		<link>http://cgarvey.ie/blog/archive/2011/01/18/irish-friendly-keyboard-layout-for-an-apple-aluminium-usb-keyboard-on-ubuntu/</link>
		<comments>http://cgarvey.ie/blog/archive/2011/01/18/irish-friendly-keyboard-layout-for-an-apple-aluminium-usb-keyboard-on-ubuntu/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 03:07:54 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=439</guid>
		<description><![CDATA[Tips on creating a custom keyboard layout for Ubuntu that will give you proper currency symbol and fada (acute accents) support for your Apple USB aluminium keyboard (UK variant).]]></description>
			<content:encoded><![CDATA[<p>By default, <a href="http://www.ubuntu.com/" title="Link to Ubuntu website">Ubuntu</a> has plenty of Irish keyboard layouts which will let you type a fada on your vowels. However, if you&#8217;re using an Apple aluminium USB keyboard, like me, you&#8217;re layout options are restricted. I have the UK variant of the keyboard, which does have a corresponding layout in Ubuntu (under United Kingdom > Macintosh), but that doesn&#8217;t provide support fadas (acute accents).</p>
<p>My goal was to have Shift+2 give me @, AltGr+2 give me €, Shift+3 give me # and AltGr+3 give me £. Also, of course, the fadas to work on any vowel (including Shift support for upper case). To do this I appended a variant to the end of the existing Ireland &#8220;symbols&#8221; file, as follows:</p>
<ol>
<li>As root, edit <code>/usr/share/X11/xkb/symbols/ie</code>. Older versions of Ubuntu (earlier than 8, I think), has a different file path.</li>
<li>At the end of the file, append the following: <code class="cdBlock">partial alphanumeric_keys<br />
xkb_symbols "macie" {<br />
    // Fix currency symbols, # symbol and 'fada' support.<br />
    include "latin"<br />
    name[Group1]= "Ireland - Macintosh";<br />
    // Numeric Row 123456789<br />
    key &lt;AE02&gt; {	[               2,              at,         EuroSign	]	};<br />
    //key &lt;AE03&gt; {	[               3,        sterling,       numbersign	]	};<br />
    key &lt;AE03&gt; {	[               3,        numbersign,       sterling	]	};<br />
    // Top Row QWERTYUIOP<br />
    key &lt;AD03&gt; { [            e,           E,               eacute,               Eacute ] };<br />
    key &lt;AD07&gt; { [            u,           U,               uacute,               Uacute ] };<br />
    key &lt;AD08&gt; { [            i,           I,               iacute,               Iacute ] };<br />
    key &lt;AD09&gt; { [            o,           O,               oacute,               Oacute ] };<br />
    // Middle Row ASDFGHJKL<br />
    key &lt;AC01&gt; { [          a,             A,               aacute,               Aacute ] };<br />
    include "level3(ralt_switch)"<br />
};<br />
</code><br />
You&#8217;ll see a comment line for the more accurate keyboard mapping of Shift+3 giving the £ symbol (to closer match the printing on the keys of a UK Apple keyboard). However, I prefer Shift+3 to give # as I&#8217;m a programmer; feel free to choose whichever you want (and comment/uncomment as appropriate). Save the file.</li>
<li>Then, you edit <code>/usr/share/X11/xkb/rules/evdev.xml</code> to configure your new variant. Search for Ireland, and you&#8217;ll see it has a &lt;variantList&gt; with a bunch of &lt;variant&gt; nodes. You want to add the following XML as a new &lt;variant&gt; node at the end of the others, and before the closing &lt;/variantList&gt; tag.<code class="cdBlock">        &lt;variant&gt;<br />
          &lt;configItem&gt;<br />
            &lt;name&gt;macie&lt;/name&gt;<br />
            &lt;description&gt;Macintosh&lt;/description&gt;<br />
          &lt;/configItem&gt;<br />
        &lt;/variant&gt;<br />
</code></li>
<li>Finally, to start using your new custom layout, go to System > Preferences > Keyboard (on a Gnome desktop) and, on the Layouts tab, you can add your new custom layout. Select &#8220;Ireland&#8221; as the country and you should see the new &#8220;Ireland Macintosh&#8221; layout. You can set the layout priority by moving the new layout up/down the list, or remove any others if you just want the one layout.</li>
</ol>
<p>So there&#8217;s a quick way to get fadas and currency symbols working for your Apple UK USB keyboard on Ubuntu.</p>
<p>UPDATE: Added missing closing XML tags for name/description in snippet above, and fix tag angle bracket mushing by WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2011/01/18/irish-friendly-keyboard-layout-for-an-apple-aluminium-usb-keyboard-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unlocking your o2 broadband modem</title>
		<link>http://cgarvey.ie/blog/archive/2011/01/07/unlocking-your-o2-broadband-modem/</link>
		<comments>http://cgarvey.ie/blog/archive/2011/01/07/unlocking-your-o2-broadband-modem/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 00:48:45 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Comms]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[huawei]]></category>
		<category><![CDATA[o2]]></category>
		<category><![CDATA[unlock]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=433</guid>
		<description><![CDATA[A quick guide to unlocking popular Huawei 3G modems used by o2 Ireland, and others.]]></description>
			<content:encoded><![CDATA[<p>If you, like me, have an o2 broadband (midband, really) modem, made by Huawei, that you want to unlock to use with other services, you can get quite the run around if you Google how to do this. There are many options (and most Huawei models seem to be easily unlocked), that charge from €5 to €15 for a code to unlock, with the most common one appearing to be dc-unlocker.com (deliberately not linked!).</p>
<p>Well, there are a few free options that are easy to use (and phone unlocking software isn&#8217;t always easy to use!). I came across <a href="http://www.ruchirablog.com/about/">Ruchira Sahan</a>&#8216;s blog which details the process, and provides the required software. Basically, you need to generate an unlock code which is based on your IMEI number (a unique code for your modem/SIM card). Software gets that for you, and will unlock the modem for you as well. He details it much better, but a summary of what I did to unlock my Huawei E1752 (an older o2 broadband USB modem) is:</p>
<ol>
<li>Close the o2 connection software</li>
<li>Download the software he links to in <a href="http://www.ruchirablog.com/guide-unlock-huawei-hsdpa-modem-free/">this post</a>, run it (there was only 1 COM port to select in my case, and it had an obvious HUAWEI label), and let it retrieve the IMEI</li>
<li>Using that IMEI, I used the calculator he links to from <a href="http://www.ruchirablog.com/free-simple-calculate-huawei-unlock-codes-2/">this post</a> to generate an unlock code</li>
<li>Using the same software, I then enter the unlock code from the previous step, and it unlocks the modem for me, with no errors or delay</li>
<li>Finally, because the o2 connection software is still crippled (and wouldn&#8217;t work with my Three SIM), I downloaded the generic Huawei connection software for that model, and many other models, from <a href="http://www.dc-files.com/">dc-files.com</a>. I did check for the presence of a virus, but still be careful when downloading any of this software. I created a new profile in that software, but that&#8217;s all I did (nothing with dial in numbers, networking, APNs or anything like that).</li>
</ol>
<p>I rarely use my o2 Broadband Modem, now that I have tethering with my iPhone4 (and a plan that includes 2GB of data), but it is handy to have in the laptop bag. It&#8217;s much handier to have with a SIM from another network on standby too!</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2011/01/07/unlocking-your-o2-broadband-modem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally have 3Pay prepaid midband on my iPad</title>
		<link>http://cgarvey.ie/blog/archive/2011/01/07/finally-have-3pay-prepaid-midband-on-my-ipad/</link>
		<comments>http://cgarvey.ie/blog/archive/2011/01/07/finally-have-3pay-prepaid-midband-on-my-ipad/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 00:23:38 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Comms]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[data roaming]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[sim]]></category>
		<category><![CDATA[three]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=428</guid>
		<description><![CDATA[A brief description of 2 common issues 3Pay Broadband from Three Ireland users might face when using it with an iPad.]]></description>
			<content:encoded><![CDATA[<p>My mission was to get Three prepaid midband (3G internet isn&#8217;t broadband, no matter who tries to tell you it is). I chose Three, because they has better 3G coverage for when I visit <a href="http://inagh.com/" title="Link to Inagh, Co. Clare, community website">Inagh</a>, and for their &#8220;Like Home&#8221; roaming service (which, <a href="http://www.three.ie/products_services/broadband/data_roaming/index.htm#" title="3 Like Home details for prepaid data roaming">I believe</a>, works for prepaid as well) which will mean cheap data whilst roaming in some countries.</p>
<p>There are 2 issues potential customers of 3Pay for iPad face.</p>
<p>Firstly, Three claim you can&#8217;t get prepaid <a href="http://en.wikipedia.org/wiki/Subscriber_Identity_Module#Development_of_the_micro-SIM" title="Wikipedia article explaining SIMs and MicroSIMs">MicroSIMs</a> (the smaller SIM card that goes in to an iPhone 4 and iPad), and that they only exist for post-pay, monthly contract users. As of the time of writing, their website mentions they&#8217;re &#8220;coming soon&#8221; (and has done for a number of months now, and their phone support people told me twice in the last 2 days that they don&#8217;t exist and that there is no immediate release plans for them. I came across <a href="http://www.boards.ie/vbulletin/showthread.php?p=69707450" title="Link to a Three MicroSIM thread on Boards.ie">a thread on boards.ie</a> where a Three representative claims 3Stores had them. A quick trip to Liffey Valley 3Store (note, the actual Three shop, not a reseller of Three services), and a short time later I&#8217;d one in my hand, promisingly labelled &#8220;MICRO SIM 3PAY BROADBAND[sic]&#8220;. I was told there was 1GB data included (no sign of how to get this, or any credit on the account). I also provided details to register, which I had to bizarrely handwrite, but registration doesn&#8217;t appear to have happened (I had to fill in the details on the MyThree website). So, ignore the 3 website, and ignore what 3 tell you on the phone. Go to a 3Store and you can get a prepaid MicroSIM.</p>
<p>The second problem many will face is registering on the MyThree website, so you can top up and buy daily/weekly/monthly passes for your &#8220;broadband&#8221;, you&#8217;ll need to be able to receive an SMS with your newly create password (or, for future reference, to retrieve a forgotten password). The iPad, of course, has no such SMS facility. So, you&#8217;ll need to find a device capable of receiving an SMS that will accept your new Three MicroSIM. Given that the most common device is an iPhone 4, and that most of these are locked to their network, you&#8217;ll need to find an unlocked iPhone 4, or an iPhone 4 from Three. Alternatively, you can <a href="http://hijinksinc.com/2010/05/14/using-a-micro-sim-in-an-iphone-3g/" title="A brief guide to making a DIY MIcroSIM adaptor">hack together</a>, or buy, a MicroSIM to SIM adaptor. In my case, I made an adaptor and used a newly-unlocked 3G modem from o2 to both test the Three network and receive their SMS.</p>
<p>So, once you can overcome those 2 hurdles, you should be able to enjoy Three&#8217;s network on your iPad, with 3Pay.</p>
<p>Feel free to contact me if you think I can answer any questions on any of this!</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2011/01/07/finally-have-3pay-prepaid-midband-on-my-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What a difference a headline can make!</title>
		<link>http://cgarvey.ie/blog/archive/2010/07/28/what-a-difference-a-headline-can-make/</link>
		<comments>http://cgarvey.ie/blog/archive/2010/07/28/what-a-difference-a-headline-can-make/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 10:45:09 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Sport]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[headlines]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=367</guid>
		<description><![CDATA[I use Google Reader to flick through headlines of various RSS feeds I&#8217;m interested in. With many thousands of articles in a given week, I really glance through the headlines before deciding to read any provided excerpt. Only if the excerpt tickles my fancy will I actually read the rest of the article. I learnt [...]]]></description>
			<content:encoded><![CDATA[<p>I use Google Reader to flick through headlines of various RSS feeds I&#8217;m interested in. With many thousands of articles in a given week, I really glance through the headlines before deciding to read any provided excerpt. Only if the excerpt tickles my fancy will I actually read the rest of the article.<br />
<span id="more-367"></span><br />
I learnt of the news of <a title="Link to Maradona's Wikipedia entry" href="http://en.wikipedia.org/wiki/Diego_Maradona">Diego Maradona</a>&#8216;s end of tenure as Argentina&#8217;s national soccer team coach with 2 adjoining headlines from <a title="Link to main RTÉ website" href="http://www.rte.ie/">RTÉ</a> and <a title="Link to Breaking News (TCM) website" href="http://www.breakingnews.ie/">Breaking News</a>.</p>
<p><a href="http://cgarvey.ie/blog/wp-content/uploads/2010/07/Maradona-GoogleReader.jpeg"><img class="aligncenter size-full wp-image-371" title="Maradona Headlines in Google Reader" src="http://cgarvey.ie/blog/wp-content/uploads/2010/07/Maradona-GoogleReader.jpeg" alt="Maradona Headlines in Google Reader" width="600" height="56" /></a></p>
<p>Whilst both articles have the exact same wording for the first paragraph, both use wildly conflicting headlines to describe the news. Whilst RTÉ&#8217;s news editorial is generally superior to TCM/BreakingNews, they&#8217;ve really lost the battle on this one! Read <a href="http://www.rte.ie/sport/soccer/2010/0727/argentina.html" title="RTÉ's Maradona news report">RTÉ&#8217;s news report</a> or <a href="http://www.breakingnews.ie/sport/maradona-calls-it-quits-467058.html" title="TCM BreakingNews' Maradona report">TCM BreakingNews&#8217; report</a>.</p>
<p style="text-align: center;"><a href="http://cgarvey.ie/blog/wp-content/uploads/2010/07/Maradona-RTE.jpeg"><img class="size-thumbnail wp-image-372" title="RTE.ie Maradona headline" src="http://cgarvey.ie/blog/wp-content/uploads/2010/07/Maradona-RTE-150x150.jpg" alt="RTE.ie Maradona headline" width="150" height="150" /></a> <a href="http://cgarvey.ie/blog/wp-content/uploads/2010/07/Maradona-BreakingNews.jpeg"><img class=" size-thumbnail wp-image-370" title="BreakingNews.ie Maradona headline" src="http://cgarvey.ie/blog/wp-content/uploads/2010/07/Maradona-BreakingNews-150x150.jpg" alt="BreakingNews.ie Maradona headline" width="150" height="150" /></a></p>
<p>For the record, Maradona wasn&#8217;t sacked. In fact to say he has &#8220;called it quits&#8221; is misleading as well (but nowhere near as misleading as RTÉ&#8217;s headline!). However, it was decided that his contract wouldn&#8217;t be renewed. Big difference, even if somewhat pedantic (moi?)!</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2010/07/28/what-a-difference-a-headline-can-make/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware with private file URLs in Dropbox for iPhone</title>
		<link>http://cgarvey.ie/blog/archive/2010/06/23/beware-with-private-file-urls-in-dropbox-for-iphone/</link>
		<comments>http://cgarvey.ie/blog/archive/2010/06/23/beware-with-private-file-urls-in-dropbox-for-iphone/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 20:22:34 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://m.cgarvey.ie/blog/?p=357</guid>
		<description><![CDATA[If you use DropBox and, specifically, its iPhone client, then you need to be aware of how the URL feature works, or risk exposing your private files. When you view a private file (i.e. a file not in your Public folder), you have the option to &#8220;Copy URL to Clipboard&#8221;. Normally, one would expect that [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="https://www.dropbox.com/referrals/NTIxNzQ5NDc5" title="Referral link to DropBox">DropBox</a> and, specifically, its iPhone client, then you need to be aware of how the URL feature works, or risk exposing your private files.<br />
<span id="more-357"></span><br />
<a href="http://cgarvey.ie/blog/wp-content/uploads/2010/06/p_480_320_D1EE82C4-FCE2-4C0A-9575-BD6C941E86CC.jpeg"><img src="http://cgarvey.ie/blog/wp-content/uploads/2010/06/p_480_320_D1EE82C4-FCE2-4C0A-9575-BD6C941E86CC-200x300.jpg" alt="" title="Screenshot of DropBox for iPhone" width="200" height="300" class="alignright size-medium wp-image-355" /></a>When you view a private file (i.e. a file not in your Public folder), you have the option to &#8220;Copy URL to Clipboard&#8221;. Normally, one would expect that to be the private URL for your private file. That is, the long URL that requires a DropBox login to view.</p>
<p>Not so in this case! What happens is, a short URL (using DropBox&#8217;s own URL shortening service, db.tt) is generated for the file. However, it&#8217;s a direct link to download the file. It&#8217;s not simply a shortened URL to point to the private URL for the file.</p>
<p>Big security risk? No, not a huge risk, but it does mean that there&#8217;s now a chance that your private file will be &#8220;brute forced&#8221;, or guessed, by someone. The private URL is as good as your password (which should be more than 6 characters! It is, right?!), but this short URL is only as good as the 6 alphanumeric characters.</p>
<p>Something to be aware of (particularly if you&#8217;re used to using DropBox outside of the iPhone client), rather than cause for panic!</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2010/06/23/beware-with-private-file-urls-in-dropbox-for-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PIL on Mac OS X Snow Leopard for use in Google App Engine</title>
		<link>http://cgarvey.ie/blog/archive/2010/01/27/installing-pil-on-mac-os-x-snow-leopard-for-use-in-google-app-engine/</link>
		<comments>http://cgarvey.ie/blog/archive/2010/01/27/installing-pil-on-mac-os-x-snow-leopard-for-use-in-google-app-engine/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 02:42:00 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[app engine]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=336</guid>
		<description><![CDATA[A solution to common problems installing PIL on Mac OS X]]></description>
			<content:encoded><![CDATA[<p>Python users who use Django or Google App Engine on the Mac, will likely benefit from the <a href="http://www.pythonware.com/products/pil/" title="Link to the PIL web page">python imaging library (PIL)</a>.<br />
<span id="more-336"></span><br />
However, installing on Mac OS X (Snow Leopard) can be tricky. There are many blog posts on the issue. The most common problem is that PIL and libjpeg (a dependency) seem to install OK, but when you go to use it in your Python code, you get &#8220;_jpeg_resync_to_restart&#8221; errors.</p>
<p>A further complication is the fact that Google App Engine uses Python version 2.5 (and not the default 2.6 that comes with Snow Leopard). If you just need PIL for Django, you can ignore the 2.5 references (i.e. python2.5 becomes python).</p>
<p>Here&#8217;s how I got it working on my machine (the steps are a combination of others&#8217; blog posts, but main credit goes to <a href="http://mtrichardson.com/" title="Link to Michael Richardson's website">Michael Richardson</a>&#8216;s <a href="http://mtrichardson.com/2009/11/pil-libjpeg-snow-leopard-and-missing-_jpeg_resync_to_restart/" title="Link to Michael Richardson's PIL post">post</a>):</p>
<ol>
<li>Download the latest libjpeg .tar.gz (version v7 at time of writing): <a href="http://www.ijg.org/files/">http://www.ijg.org/files/</a>.</li>
<li>Download the latest PIL version for Python 2.5 (v1.17 at time of writing): <a href="http://www.pythonware.com/products/pil/">http://www.pythonware.com/products/pil/</a></li>
<li>Extract libjpeg and do the standard install affair:<code><br />
export CC="gcc -arch i386"<br />
./configure<br />
make<br />
sudo make install<br />
</code> from within the directory. The first line is the gem that many other blog posts leave out (and it assumes you&#8217;re using BASH)</li>
<li>Extract the PIL and change in to that directory.</li>
<li>[optional] libjpeg will have been installed in /usr/local/lib/, by default, above. Normally this directory will be picked up automatically by the PIL install below, but just for good measure (or if you have problems later in the PIL install), edit the <code>setup.py</code>, look for the line <code><br />
JPEG_ROOT = None<br />
</code>. Change that line to <code><br />
JPEG_ROOT=libinclude( "/usr/local" )<br />
</code> and save it.</li>
<li>Install PIL by running <code><br />
sudo python2.5 setup.py install<br />
</code></li>
</ol>
<p>That was enough to get it running for me. I can start App Engine (I use the Google-provided launcher), and use the Image API.</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2010/01/27/installing-pil-on-mac-os-x-snow-leopard-for-use-in-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Running dotMobi WordPress Mobile Pack on PHP 4</title>
		<link>http://cgarvey.ie/blog/archive/2009/11/02/running-dotmobi-wordpress-mobile-pack-on-php-4/</link>
		<comments>http://cgarvey.ie/blog/archive/2009/11/02/running-dotmobi-wordpress-mobile-pack-on-php-4/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 22:47:58 +0000</pubDate>
		<dc:creator>cgarvey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://cgarvey.ie/blog/?p=331</guid>
		<description><![CDATA[If you, like me, are installing the dotMobi WordPress Mobile Pack on a server with PHP4 installed, and you enable the &#8220;Shrink images&#8221; feature under &#8220;Mobile Theme&#8221;, you will likely see just the header of a blog post being out put for mobile devices (and not the full content). This feature reduces the image size [...]]]></description>
			<content:encoded><![CDATA[<p>If you, like me, are installing the <a href="http://wordpress.org/extend/plugins/wordpress-mobile-pack/" title="Link to the dotMobi WordPress Mobile Pack plugin page">dotMobi WordPress Mobile Pack</a> on a server with PHP4 installed, and you enable the &#8220;Shrink images&#8221; feature under &#8220;Mobile Theme&#8221;, you will likely see just the header of a blog post being out put for mobile devices (and not the full content).<br />
<span id="more-331"></span><br />
This feature reduces the image size (of any images in your WordPress post/page) to make it more bandwidth and screen friendly for mobile users. The problem is that it uses a PHP5-only call of <code>file_put_contents(..)</code>, which fails without error, or logging, on my WordPress install.</p>
<p>To remedy the problem, I substituted the call, in 2 places, with the PHP4 equivalent calls. <code>file_put_contents(..)</code> is a shortcut convenience method which is the same as calling <code>fopen(..)</code>, <code>fwrite(..)</code> and <code>fclose(..)</code>.</p>
<p>As of version 1.1.3 of the plugin the code is under <code>wp-content/plugins/wordpress-mobile-pack/plugins/wpmp_transcoder/</code> in your WordPress install directory. The 2 occurrences are in the file <code>wpmp_transcoder.php</code> on lines 431 and 448 respectively.</p>
<p>I changed<br />
<code><br />
@file_put_contents($full_location, $data);<br />
</code><br />
.. to ..<br />
<code><br />
$fhout = @fopen($full_location, "w" );<br />
@fwrite($fhout, $data);<br />
@fclose( $fhout );<br />
</code></p>
<p>.. and ..</p>
<p><code><br />
@file_put_contents("$full_location.meta", "< ?php $"."width='$width';$"."height='$height';$"."type='$type'; ?>");<br />
</code><br />
.. to ..<br />
<code><br />
$fhmeta = @fopen( "$full_location.meta", "w" );<br />
@fwrite( $fhmeta, "< ?php $"."width='$width';$"."height='$height';$"."type='$type'; ?>");<br />
@fclose( $fhmeta );<br />
</code><br />
.. and all was well again.</p>
<p>You could also just not use the &#8220;Shrink images&#8221; feature to avoid having to mess with any code!</p>
]]></content:encoded>
			<wfw:commentRss>http://cgarvey.ie/blog/archive/2009/11/02/running-dotmobi-wordpress-mobile-pack-on-php-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.211 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-17 16:16:47 -->

