<?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>Darragh's Blog</title>
	<atom:link href="http://www.darraghbailey.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.darraghbailey.com/wordpress</link>
	<description>Technicial blog for my own interests, who knows something might appear that interests you</description>
	<lastBuildDate>Tue, 01 Sep 2009 08:35:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Script to proxy git and svn protocols via http proxy</title>
		<link>http://www.darraghbailey.com/wordpress/?p=23</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=23#comments</comments>
		<pubDate>Mon, 31 Aug 2009 10:04:45 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=23</guid>
		<description><![CDATA[In work I&#8217;ve discovered a number of problems when accessing open source code repositories that are using SVN or GIT. Attempts to access a number of repositories just fails with a connection failed message.
After some time of getting these, and finding some repositories working, I noticed that the common attribute for those repo&#8217;s that were [...]]]></description>
			<content:encoded><![CDATA[<p>In work I&#8217;ve discovered a number of problems when accessing open source code repositories that are using SVN or GIT. Attempts to access a number of repositories just fails with a connection failed message.</p>
<p>After some time of getting these, and finding some repositories working, I noticed that the common attribute for those repo&#8217;s that were accessible, was that they were via http. Now that might be fine, but there is a reason for the repositories to have their own protocols, in that they are tuned to be more efficient at transferring the necessary information. In addition not all sites make the repositories available over http in additional to the native format.</p>
<p>Obviously the core problem here is with the corporate firewall blocking outbound requests over certain ports. Perfectly understandable, but sometimes just a little unhelpful when you need to be able to access various upstream repositories when working with open source to check for bug fixes in the code.</p>
<p>After several problems in accessing some git repos that didn&#8217;t have http equivalents I did some searching and found the following website <a title="gitproxy" href="http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/" target="_blank">http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/</a> which described how you could use <strong>socat</strong> to create a tunnel that allowed access to git repositories without having to find one that permitted access over http.</p>
<p><span id="more-23"></span></p>
<blockquote>
<pre><span style="color: #0000ff;">
<span style="color: #888888;"><em>#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
#   chmod +x gitproxy
#   git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
# Configuration. Common proxy ports are 3128, 8123, 8000.
_proxy=proxy.yourcompany.com
_proxyport=3128

exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport</em></span>
</span></pre>
</blockquote>
<p>After some problems accessing various SVN repositories as well, I managed to come up with a script that was a little more flexible. Note that I&#8217;m aware that SVN is supposed to provide that ability to use http proxies, however for some reason it just doesn&#8217;t seem to work as intended for me.</p>
<blockquote>
<pre><span style="color: #888888;"><em>#!/bin/bash
#
# Use socat to proxy common SCM protocols through HTTP CONNECT firewall.
# Useful if you are trying to use svn or git where a http version of the repo
# is not available for use. For svn, while it supports setting a http proxy in
# the config file, I've not found it particularly reliable.
#
#
# Save this file as repoproxy somewhere in your path (e.g., ~/bin), make it executable,
# and then create the symlinks either gitproxy or svnproxy in the same location and
# following the instructions appropriate to them.
#

# GIT
#
# gitproxy
#  git config --global core.gitproxy gitproxy
#
# More details and original at
# http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/
#

# SVN
#
# svnproxy
#  edit ~/.subversion/config and add "socat = &lt;path to script&gt;" under the tunnels section
#
# then whenever using svn, simply change the line "svn://" to read "svn+socat://"
# and continue to use as normal
#

# Need proxy settings
[[ -z "${http_proxy}" ]] &amp;&amp; \
    echo "Need http_proxy to be set somewhere in order for this script be able to use socat!" &amp;&amp; \
    exit 2

_proxy=${http_proxy%:*}
_proxyport=
if [[ "${http_proxy#*:}" != "${_proxy}" ]]
then
    _proxyport=${http_proxy#*:}
fi

case ${0##*/} in
    "svnproxy")
        targetserver="${1#*@}"
        targetport="3690"</em></span><span style="color: #0000ff;"><span style="color: #888888;"><em>
        ;;
    "gitproxy")
        targetserver=$1
        targetport=$2
        ;;
    *)
        echo "Unknown usage! ${0##*/} is not a recognised command"
        exit 1
        ;;
esac

echo "socat STDIO PROXY:${_proxy}:${targetserver}:${targetport}${_proxyport:+,proxyport=${_proxyport}}" &gt;&amp;2
exec socat STDIO PROXY:${_proxy}:${targetserver}:${targetport}${_proxyport:+,proxyport=${_proxyport}}</em></span>
</span></pre>
</blockquote>
<p>Hopefully this will be useful to people other than just me</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DVD Recorder &#8211; Philips DVDR3480</title>
		<link>http://www.darraghbailey.com/wordpress/?p=19</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=19#comments</comments>
		<pubDate>Sun, 28 Dec 2008 14:50:09 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=19</guid>
		<description><![CDATA[Just picked up a DVD recorder for the TV, yesterday. Personally I have pumped for the most kitted out, but my girl friend is more rooted in real life and points out that most of the feature rich ones are still quite expensive.
Looks a nice piece of kit, and seems to be reasonably good €129 [...]]]></description>
			<content:encoded><![CDATA[<p>Just picked up a DVD recorder for the TV, yesterday. Personally I have pumped for the most kitted out, but my girl friend is more rooted in real life and points out that most of the feature rich ones are still quite expensive.</p>
<p>Looks a nice piece of kit, and seems to be reasonably good €129 (Dec 2008). Have yet to try out the recording features, but it already does one thing that I really wanted, play region 1 DVD&#8217;s. <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Of course I did have to unlock it to do that.</p>
<h3>Why Unlock?</h3>
<p>Probably a question used by legal people to suggest that it&#8217;s somewhat illegal. Basically region locking is only present to allow for artificial  control of markets and to try and prevent the natural economic laws of supply and demand from equalizing prices all over the world. You&#8217;ll hear sometimes the arguments that people in some regions can&#8217;t afford the true price and so the publishing houses need to be able to sell them for cheaper there. That&#8217;s a load of crock, if they don&#8217;t make money from it, they won&#8217;t sell them. It&#8217;s always been a question of how much they can jack up the prices in the regions where something is known to be popular.</p>
<p>For me, the main reason is that the selection of anime made available as region 2, is pretty dire. Since I use Linux and watch a lot of my DVD&#8217;s on the PC, I had built up a collection of region 1 anime that has not been released in region 2 (or at least has not been made available within the shops that I have access to). Thankfully Linux is capable of completely by passing the region codes on all DVD&#8217;s, not to mention able to skip sections that the DVD producers are obliged to force you to watch. You know the parts, the copyright notices, the Dolby Digital snippet, etc. Once you&#8217;ve seen one, you don&#8217;t really want to watch any of the others.</p>
<p><span id="more-19"></span></p>
<h3><span style="color: #000000;"><strong>Unlocking</strong></span></h3>
<p>The unlocking procedure is very straight forward, in fact I suspect that the unlock codes are available for just about all DVD player&#8217;s and recorders currently available. Original link <a title="DVD unlock code for philips DVDR3480" href="http://www.videohelp.com/dvdhacks?dvdplayer=Philips+3480&amp;hits=50" target="_blank">http://www.videohelp.com/dvdhacks?dvdplayer=Philips+3480&amp;hits=50</a>.</p>
<ol>
<li>Turn on DVD recorder with no DVD inserted</li>
<li>Press &#8216;Setup&#8217; on remote</li>
<li>Enter the following numbers slowly (should see an X appear on the screen for each one)</li>
<li>5, 0, 8, 1</li>
<li>This will bring up a maintenance screen that is used to set the region code</li>
<li>Press &#8216;0&#8242; to change the region to All</li>
<li>Press &#8216;Ok&#8217; to confirm</li>
<li>Insert your DVD&#8217;s from around the world and enjoy</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suspected HG stroke</title>
		<link>http://www.darraghbailey.com/wordpress/?p=17</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=17#comments</comments>
		<pubDate>Mon, 10 Nov 2008 11:25:38 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Car]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[head gasket]]></category>
		<category><![CDATA[stroke]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=17</guid>
		<description><![CDATA[Well, this weekend was just fantastic. In the middle of looking a new apartment to move in with my girlfriend, my lovely BMW &#8216;93 318IS Coupe decided to have a stroke. While on the dual carraige-way, a rather large cloud of white smoke appeared out the back of the car. Uh-oh, stopped the car, checked [...]]]></description>
			<content:encoded><![CDATA[<p>Well, this weekend was just fantastic. In the middle of looking a new apartment to move in with my girlfriend, my lovely BMW &#8216;93 318IS Coupe decided to have a stroke. While on the dual carraige-way, a rather large cloud of white smoke appeared out the back of the car. Uh-oh, stopped the car, checked the radiator and oil caps. Nuts, some milky white fluid on the oil cap, classic sign of coolant getting where it shouldn&#8217;t get to.</p>
<p>Previous weekend I had just bled the coolant and topped it up, and was midly concerned about the amount that went in, ~2l (took 3l really, but about .5-1l ended up on the ground underneath the car). Obviously that&#8217;s a bit of a concern, 2l is a lot of coolant to loose from a car that has a capacity of 6l for coolant. Looked around for a leak, thinking, &#8216;this is something that I need to get looked at soon&#8217;.</p>
<p>Step forward a few mornings and the car is starting on the rough side and then smoothing out, kind of like a smoker sitting up in the morning and hacking their lungs out until they get the first fag, although I was hoping it would be less fatal.</p>
<p>Obviously that all came to a head with the white smoke.</p>
<p>Plan is to toe the car to a garage and have the presure test done on it&#8217;s engine to confirm, and then if it really is the HG, time to add a massive new project to this site on how to dismantle your engine and put it back together again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What LCD?</title>
		<link>http://www.darraghbailey.com/wordpress/?p=15</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=15#comments</comments>
		<pubDate>Wed, 28 May 2008 23:16:28 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=15</guid>
		<description><![CDATA[So I decided to splash out a bit and replace the old 19&#8243; CRT radioactive source that I used to call my monitor. I&#8217;m sure my eyes are grateful for the change. Initially I decided that I wanted a 24&#8243; replacement, I figured there was no point spending a lot of money upgrading unless it [...]]]></description>
			<content:encoded><![CDATA[<p>So I decided to splash out a bit and replace the old 19&#8243; CRT radioactive source that I used to call my monitor. I&#8217;m sure my eyes are grateful for the change. Initially I decided that I wanted a 24&#8243; replacement, I figured there was no point spending a lot of money upgrading unless it was going to be a significant upgrade.</p>
<p>Initial thoughts included the following monitors:</p>
<p>BenQ 24&#8243; G2400W<br />
IIyama 24&#8243; Wide ProLite B2403WS-B1<br />
LG 24&#8243; Wide L246WH-BN<br />
Samsung 24&#8243; LCD Syncmaster 245B</p>
<p>However, after a little advice and some searching I finally settled on a <strong>Dell 2408WFP</strong>, and I&#8217;m one very satisfied customer. It has just about every connector under the sun! VGA, DVI, HDMI, S-Video, Composite, DisplayPort, I doubt that I&#8217;ll have any problems with compatibility anytime in the future.</p>
<p>I&#8217;ve very impressed with the depth of black, and also the contrast between dark and light colours. The only negative point appears to be some tearing of the current output, however I haven&#8217;t worked out what the cause for that is. It is easier to see this by watching a comparison of the boot sequence running on both my old and new monitors at the same time.</p>
<p><object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="264" height="216" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"><param name="url" value="http://www.darraghbailey.com/videos/monitors_booting.avi" /><embed type="application/x-mplayer2" width="264" height="216" url="http://www.darraghbailey.com/videos/monitors_booting.avi" autostart="false"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.darraghbailey.com/videos/monitors_booting.avi" length="4833510" type="video/x-msvideo" />
		</item>
		<item>
		<title>stoping vim from autoindenting pasted text</title>
		<link>http://www.darraghbailey.com/wordpress/?p=14</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=14#comments</comments>
		<pubDate>Wed, 05 Mar 2008 17:15:06 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[copy & paste]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=14</guid>
		<description><![CDATA[Vim has been my editor of choice for a while now. I&#8217;m not going to get into the whole emacs v&#8217;s vi debate, just take it that I prefer a modal text editor and vim suits my needs. So I&#8217;ve never seen a need to go and learn emacs.
Once of the little problems that has [...]]]></description>
			<content:encoded><![CDATA[<p>Vim has been my editor of choice for a while now. I&#8217;m not going to get into the whole emacs v&#8217;s vi debate, just take it that I prefer a modal text editor and vim suits my needs. So I&#8217;ve never seen a need to go and learn emacs.</p>
<p>Once of the little problems that has annoyed me for a while, but I&#8217;ve never gotten around to trying to do anything to solve it, is where when copy and pasting code from one file to another, vim automatically increases the indent on each line. Turning something that is nicely formatted with various tabing/spacing set into an unreadable mess.</p>
<p>Of course I kept meaning to have a look at this, since I was sure there was an easy fix. The problem reared its head on the wine-users list recently <a href="http://www.winehq.org/pipermail/wine-users/2008-March/029545.html">http://www.winehq.org/pipermail/wine-users/2008-March/029545.html</a>, for which I decided to find the fix.</p>
<p>It was very simple in the end, <a href="http://vim.sourceforge.net/tips/tip.php?tip_id=330">http://vim.sourceforge.net/tips/tip.php?tip_id=330</a> and definitely a site that I will bookmark for future reference. <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the dog&#8217;s config</title>
		<link>http://www.darraghbailey.com/wordpress/?p=13</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=13#comments</comments>
		<pubDate>Wed, 30 Jan 2008 00:46:22 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[muttrc]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=13</guid>
		<description><![CDATA[Spend a little time over the last few days trying to sort out my email client. I wanted it to show me when I had new email in the various folders. Why? Because I use procmail to sort my mail when it arrives into various folders, otherwise I would never be able to keep as [...]]]></description>
			<content:encoded><![CDATA[<p>Spend a little time over the last few days trying to sort out my email client. I wanted it to show me when I had new email in the various folders. Why? Because I use procmail to sort my mail when it arrives into various folders, otherwise I would never be able to keep as much as I do <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>There were also other problems that I felt that using imap would fix, such as locking so that if I open the mail folder using another client using imap, it would detect that it was already being accessed. This used to bug me when using the web interface horde/imp for email and when mutt was doing direct file access. Accessing the mailbox over imap in imp, even if it was just a search would result in the mailbox going read only, so any changes made by mutt were discarded.</p>
<p>Thankfully that&#8217;s all taken care of by switching to using imap with mutt. It also means that I can use mutt from my home PC to directly read email on the mail server, rather than having to open a shell first and start mutt remotely.</p>
<p>Mutts documentation on how to use imap is available via the following url <a href="http://mutt.sourceforge.net/imap/" title="imap with mutt" target="_blank">http://mutt.sourceforge.net/imap/</a>.</p>
<p>Anyway, here&#8217;s the low down on my current config, it might be useful to you or even me if I lose the files <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span id="more-13"></span></p>
<p>Firstly I think we should setup the imap settings, then go to the preferences. Need to set the spoolfile so that mutt knowns the default mailbox that receives email. I also want to make sure it uses secure imap if available. You can make sure that mutt doesn&#8217;t attempt to fall back to insecure access by setting the port as well.</p>
<blockquote><p> <em>set spoolfile=imaps://mailserver.tld/INBOX</em></p></blockquote>
<p>Now, to make sure that mutt knows the default folder name where the remaining mailboxes can be accessed from. The benefit of this will be clear later.</p>
<blockquote><p><em>set folder=imaps://</em><em>mailserver.tld</em><em>/</em></p></blockquote>
<p>Since we have now set the folder option, we can now specify all the mailboxes that we want mutt to check for new mail arriving. The mail will have been placed in the folders by procmail, which is why mutt will need to poll for changes and also needs to be told which folders to look at. We don&#8217;t really care about spam that much do we? Note that you need to include INBOX as well, otherwise when browsing other folders you won&#8217;t receive notifications from mutt about new email in that mailbox.</p>
<blockquote><p><em>mailboxes  =INBOX =lists/ilug =lists/wine/devel =lists/wine/users =lists/compsoc/announce =lists/compsoc/discuss</em></p></blockquote>
<p>Above is actually all on 1 line.</p>
<p>Now onto the various preferences, I&#8217;ll deal first with those that will directly affect imap settings. By default with <em>mailboxes</em> set mutt will scan all the folders every 5 seconds. That&#8217;s a little bit too often if you have a number of folders with several thousand messages in them. So I set it to 60, as suggested by the documentation.</p>
<blockquote><p><em>set mail_check=60</em></p></blockquote>
<p>Mutt doesn&#8217;t check the current folder that often though, that is controlled by a maximum setting of 600 seconds, controlled by timeout. The documentation suggests 15, and I&#8217;ve no reason to disagree with it, but 60 is probably often enough.</p>
<blockquote><p><em>set timeout=60</em></p></blockquote>
<p>Next we move on to some of the preferences that have more to do with my personal quirks. I generally like to retain copies of all mail I send, just in case I need to check what I said previously. By default mutt doesn&#8217;t do this, but its pretty straight forward to enable it. Also there really is supposed to be two equals signs below, its to do with the requirement to put one before an imap mailbox, and I want my sent mail stored in one as well.</p>
<blockquote><p><em>set record==sent-mail</em></p></blockquote>
<p>I don&#8217;t want mutt to ever move my email from my INBOX to any other folder automatically. When I want that done, I&#8217;ll modify my procmail setup. So disable the question about moving mail:</p>
<blockquote><p> <em>set move=no</em></p></blockquote>
<p>Generally I like to see the mail headers while I&#8217;m editing my emails, it allows me to make quick changes to the to, from, cc &amp; bcc fields with my favourite editor without having to switch back and forth to the mutt menu.</p>
<blockquote><p><em>set edit_headers</em></p></blockquote>
<p>I also didn&#8217;t like how the pager would end up continuing to the next email once you reached the end. It wasn&#8217;t always obvious that you had reached the end. Ok, so I miss the little text saying end, but just because I miss that when going through a stack of emails can end up really annoying the hell out of me. So I disabled that behaviour <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<blockquote><p> <em>set pager_stop</em></p></blockquote>
<p>One behaviour that I did not like with mutt was that by default it would go to the first new email, rather than the first unread email in a folder, and the TAB key by default would move you to the next new email. This was particularly awkward with mailing lists where you might not have time to read all the emails one day but just concentrate on a particular thread. I still want to start from the first unread email the next time so that I can get the first emails in unread threads, rather than the first to arrive since I last accessed the folder. Luckily mutt will allow you to change the default bindings easily. The following two settings make sure that in both the index view of the mail box and when moving to the next email in the reader, that I always move to the next unread. I haven&#8217;t found a use for previous-unread, but I make the binding change to keep things consistent, its not necessary though.</p>
<blockquote><p><em>bind index,pager &lt;TAB&gt; next-unread</em><br />
<em>bind index,pager &lt;ESC&gt;&lt;TAB&gt; previous-unread</em></p></blockquote>
<p>My next gripe was with movement in the reader (or pager as it is known), up and down moved you a whole page. That&#8217;s what the bloody Page-Up/Page-Down keys are for, ok! Anyway, it&#8217;s another fairly simple binding to change.</p>
<blockquote><p><em>bind pager      &lt;up&gt;            previous-line<br />
bind pager      &lt;down&gt;          next-line</em></p></blockquote>
<p>I also like Home and End to behave exactly as it says on the tin, go to the start and end respectively.</p>
<blockquote><p><em>bind pager      &lt;home&gt;          top<br />
bind pager      &lt;end&gt;           bottom</em></p></blockquote>
<p>Finally I like my email addresses and web links to be highlighted when reading. I suspect I grabbed this from some site, but I can&#8217;t remember where. I like it, so might you. (actually only 3 lines below, but the regex gets pushed to the following line due to length.)</p>
<blockquote><p><em>color body              brightcyan      default &#8220;[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+&#8221;<br />
color body              brightwhite     default &#8220;(http|ftp|news|telnet|finger)://[^ \"&gt;\t\r\n]*&#8221;<br />
color body              brightwhite     default &#8220;mailto:[-a-z_0-9.]+@[-a-z_0-9.]+&#8221;</em></p></blockquote>
<p>So the final .muttrc file looks like this:</p>
<blockquote><p><em>set spoolfile=imaps://mailserver.tld/INBOX</em><br />
<em>set folder=imaps://</em><em>mailserver.tld</em><em>/</em><br />
<em>mailboxes  =lists/ilug =lists/wine/devel =lists/wine/users =lists/compsoc/announce =lists/compsoc/discuss</em><br />
<em>set mail_check=60</em><br />
<em>set timeout=60</em><br />
<em>set record==sent-mail</em><br />
<em>set move=no</em><br />
<em>set edit_headers</em><br />
<em>set pager_stop</em><br />
<em>bind index,pager &lt;TAB&gt; next-unread</em><br />
<em>bind index,pager &lt;ESC&gt;&lt;TAB&gt; previous-unread</em><br />
<em>bind pager      &lt;up&gt;            previous-line<br />
bind pager      &lt;down&gt;          next-line</em><br />
<em>bind pager      &lt;home&gt;          top<br />
bind pager      &lt;end&gt;           bottom</em><br />
<em>color body              brightcyan      default &#8220;[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+&#8221;<br />
color body              brightwhite     default &#8220;(http|ftp|news|telnet|finger)://[^ \"&gt;\t\r\n]*&#8221;<br />
color body              brightwhite     default &#8220;mailto:[-a-z_0-9.]+@[-a-z_0-9.]+&#8221;</em></p></blockquote>
<p>Hopefully anyone who made it this far will actually find this usefue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Templating in PHP</title>
		<link>http://www.darraghbailey.com/wordpress/?p=12</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=12#comments</comments>
		<pubDate>Wed, 09 Jan 2008 19:44:45 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=12</guid>
		<description><![CDATA[Have been meaning to try this out for a while now, basically because once you get the html code separated out from the PHP it becomes much easier to see what&#8217;s going on and change the style and layout of the web pages.
Easier because the PHP scripts basically become shorter, and changing the layout of [...]]]></description>
			<content:encoded><![CDATA[<p>Have been meaning to try this out for a while now, basically because once you get the html code separated out from the PHP it becomes much easier to see what&#8217;s going on and change the style and layout of the web pages.</p>
<p>Easier because the PHP scripts basically become shorter, and changing the layout of a few variable place holders in html files is a damn sight easier than moving about chunks of code.</p>
<p>Current template code I&#8217;ve been using is from the PEAR project, <a href="http://pear.php.net/package/HTML_Template_PHPLIB" title="HTML Template PHPLIB">http://pear.php.net/package/HTML_Template_PHPLIB</a>, which is similar to the PHPLIB implementation. There were a number of other implementations available at the same time, but this appeared to be the easiest to use besides IT, <a href="http://pear.php.net/package/HTML_Template_PHPLIB" title="HTML Template IT">http://pear.php.net/package/HTML_Template_IT</a>, which is in fact broken.</p>
<p>Smarty and Flexy appear to be two other template engines that may prove interesting for use with PHP if I ever work on any other more extensive web development projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=12</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>register365 and my domains</title>
		<link>http://www.darraghbailey.com/wordpress/?p=11</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=11#comments</comments>
		<pubDate>Wed, 19 Dec 2007 19:46:44 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[fun & games]]></category>
		<category><![CDATA[registrar]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.darraghbailey.com/wordpress/?p=11</guid>
		<description><![CDATA[Well I&#8217;ve finally managed to have my blog appear with my own personal domain  , but boy was it fun trying to get here. And it&#8217;s also highlighted some interesting gotcha&#8217;s when requesting domain registrar to point your domains elsewhere.
So now I have darraghbailey.com, which points to this blog. But it wasn&#8217;t entirely straight [...]]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;ve finally managed to have my blog appear with my own personal domain <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , but boy was it fun trying to get here. And it&#8217;s also highlighted some interesting gotcha&#8217;s when requesting domain registrar to point your domains elsewhere.</p>
<p>So now I have darraghbailey.com, which points to this blog. But it wasn&#8217;t entirely straight forward. Upon registering the domains I discovered that register365.com didn&#8217;t appear to have any mechanism to allow you to change where they pointed to. That would be something that is nice, even if it needed to go through an approval process. It appears that they are working on a lot of features for the user control panel since it lacks a great deal of functionality. Just trying to pay for your domains via the CP is impossible. On the plus side, the support team at register365 is very responsive, so it&#8217;s not really all that big of an issue.</p>
<p><span id="more-11"></span></p>
<p>So I had a little chat with the admins of the server that hosts my blog website (plus a number of other sites for me), and was told that I needed to request that the domains have a CNAME entry put into the DNS database by the registrar pointing to the server that the websites are hosted on (riviera.nuigalway.ie). Now I don&#8217;t know DNS very well, but the basic lookup of the documentation suggested to me that the main reason for this would be in case the IP address assigned to riviera.nuigalway.ie was ever changed in the future. Setting the A record for my new domains to the IP address of this server would mean that should such a change happen, all domains pointing to that address would need to be modified. If they use CNAME to just point to the server name, all systems will do a second DNS lookup and retrieve the updated address for the server automatically.</p>
<p>Turns out that this just isn&#8217;t possible for register365. They can manage something like that if your website is being hosted on hosting365, but for anyone else they need to set the A record to point to the address. I understand that technically this speeds up the DNS lookup since it only requires one request, however I&#8217;m still at a loss to explain why this functionality is missing. Possibly it makes their life easier, it certainly can leave virtual hosted websites on a server with a little problem should the host address change, leaving them to need to request an update of all A records for sites hosted.</p>
<p>However all that aside, what actually irked me was that when I asked for the CNAME reference to be setup, rather than put in a CNAME entry pointing at riviera, they kept it pointing at one of their own servers and did a cloaked redirect. What in the hell benefit was that? Really if I ask for a number of domains to use CNAME  to point to another domain, that count hardly mean &#8220;please leave this pointing at your own servers and then redirect to the referenced domain&#8221;.</p>
<p>After going back to them and pointing out that I didn&#8217;t want a redirect I expected two entries such as the following to be added:</p>
<p>&#8220;ironfistprotectorate.com CNAME riviera.nuigalway.ie&#8221;</p>
<p>&#8220;darraghbailey.com CNAME riviera.nuigalway.ie&#8221;</p>
<p>At which point they indicated that this wouldn&#8217;t be possible and they would have to just set the A records for the two domains to point to the IP address of the host system riviera.nuigalway.ie which would allow me to have the vhosts work with the two domains.</p>
<p>Thankfully I would say that register365 showed one excellent trait:</p>
<ul>
<li>They are incredible quick to respond to any issue and look in to solving it to your satisfaction</li>
</ul>
<p>That one reason above is the best reason to stick with any company.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buggy Quotes in wine&#8217;s CreateProcessW</title>
		<link>http://www.darraghbailey.com/wordpress/?p=10</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=10#comments</comments>
		<pubDate>Sun, 02 Dec 2007 21:34:36 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://www.compsoc.nuigalway.ie/~felix/wordpress/?p=10</guid>
		<description><![CDATA[Well after a great deal of exploration, I isolated a bug in wine&#8217;s CreateProcessW function that results in a invalid argv being sent to target programs in certain cases.
This was interesting since it was my first real foray into the wine code base, and showed that printf is still very much the staple of any [...]]]></description>
			<content:encoded><![CDATA[<p>Well after a great deal of exploration, I isolated a bug in wine&#8217;s CreateProcessW function that results in a invalid argv being sent to target programs in certain cases.</p>
<p>This was interesting since it was my first real foray into the wine code base, and showed that printf is still very much the staple of any coders debugging diet <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>If the wine project is of any interest to you, go ahead and have a look at <a href="http://bugs.winehq.org/show_bug.cgi?id=10618" target="_blank">bug 10618</a> , it shows that even without a good knowledge of a large projects code base, you can still learn and debug a fairly well hidden bug if you are willing to just follow through.</p>
<p>Next steps are to write some conformance tests to confirm what the correct behaviour on Windows actually is. This appears to be a corner case bug, and it will be interesting to see how Windows decides if it has reached an escaped quote or a quote preceded by a slash. Yes there is a difference <img src='http://www.darraghbailey.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>However before I start submitting patches, I need to make sure that my employer signs off on me sending code into this project provided I work on my own time. It&#8217;s an important check for anyone to do, otherwise you could find both the project and yourself on the wrong side of a legal suit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time for Hibernation</title>
		<link>http://www.darraghbailey.com/wordpress/?p=9</link>
		<comments>http://www.darraghbailey.com/wordpress/?p=9#comments</comments>
		<pubDate>Tue, 27 Nov 2007 20:33:08 +0000</pubDate>
		<dc:creator>Darragh</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[acpi]]></category>
		<category><![CDATA[hibernation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[suspend]]></category>

		<guid isPermaLink="false">http://www.compsoc.nuigalway.ie/~felix/wordpress/?p=9</guid>
		<description><![CDATA[ Well after that post yesterday, I decided to try testing the suspend/hibernation functionality using the Open Source drivers rather than nVidia&#8217;s proprietary ones. Low and behold it worked!
Success, or maybe not, since I&#8217;m not happy that I lose a fair bit of screen real estate in the switch to the other drivers, not to [...]]]></description>
			<content:encoded><![CDATA[<p> Well after that post yesterday, I decided to try testing the suspend/hibernation functionality using the Open Source drivers rather than nVidia&#8217;s proprietary ones. Low and behold it worked!</p>
<p>Success, or maybe not, since I&#8217;m not happy that I lose a fair bit of screen real estate in the switch to the other drivers, not to mention the lack of ability to play games that require hardware accelerated graphics. Now the graphics card in this machine is much to write home about, but without using NVIDIA&#8217;s drivers, its basically impossible to play just about anything that uses graphics. Unless I&#8217;m going to stick to something like <a href="http://falconseye.sourceforge.net/" target="_blank">Falcon&#8217;s Eye</a>.</p>
<p>So the search goes on for the solution with NVIDIA&#8217;s video drivers. Obviously that is the main culprit in not being able to resume from hibernation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darraghbailey.com/wordpress/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
