<?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>klkl</title>
	<atom:link href="http://klkl.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://klkl.co.uk</link>
	<description>it's easy to type</description>
	<lastBuildDate>Tue, 22 Dec 2009 16:38:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mac Firewall: Do You Want the Application Vuze.app to Accept Incoming Network Connections</title>
		<link>http://klkl.co.uk/2009/12/22/mac-firewall-do-you-want-the-application-vuze-app-to-accept-incoming-network-connections/</link>
		<comments>http://klkl.co.uk/2009/12/22/mac-firewall-do-you-want-the-application-vuze-app-to-accept-incoming-network-connections/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 16:37:15 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[vuze]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=240</guid>
		<description><![CDATA[<p>Recently I&#8217;ve had a bother with the Mac firewall asking me if I want it to accept incomming network connections every time I open a particular application.</p>
<p>The appropriate setting can be found under:</p>
<p style="padding-left: 30px;"><strong>System Preferences : Personal &gt; Security &gt; Firewall</strong></p>
<p>I have mine configured to &#8220;Set access for specific services and applications&#8221; which normally asks me if I want to allow an application to accept incoming connections<strong> </strong>the first time I run it and that&#8217;s normally the end of it. The trouble comes when you try and update certain applications using <strong>Software Update</strong>. I&#8217;m not exactly sure what causes the problem but for some reason with specific applications the firewall then proceeds to ask you, each time, if you would like it to accept incoming network connections. This you can imagine is superlatively tedious.</p>
<p>The answer though is to just delete the application from you applications folder and reinstall it. The first time you open the freshly installed application it will ask the question and then bug you no more. Then all you have to worry about is not updating it via software update again.</p>
]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve had a bother with the Mac firewall asking me if I want it to accept incomming network connections every time I open a particular application.</p>
<p>The appropriate setting can be found under:</p>
<p style="padding-left: 30px;"><strong>System Preferences : Personal &gt; Security &gt; Firewall</strong></p>
<p>I have mine configured to &#8220;Set access for specific services and applications&#8221; which normally asks me if I want to allow an application to accept incoming connections<strong> </strong>the first time I run it and that&#8217;s normally the end of it. The trouble comes when you try and update certain applications using <strong>Software Update</strong>. I&#8217;m not exactly sure what causes the problem but for some reason with specific applications the firewall then proceeds to ask you, each time, if you would like it to accept incoming network connections. This you can imagine is superlatively tedious.</p>
<p>The answer though is to just delete the application from you applications folder and reinstall it. The first time you open the freshly installed application it will ask the question and then bug you no more. Then all you have to worry about is not updating it via software update again.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/12/22/mac-firewall-do-you-want-the-application-vuze-app-to-accept-incoming-network-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic POP3 &amp; IMAP Connection Testing via Telnet</title>
		<link>http://klkl.co.uk/2009/12/15/basic-pop3-imap-connection-testing-via-telnet/</link>
		<comments>http://klkl.co.uk/2009/12/15/basic-pop3-imap-connection-testing-via-telnet/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 14:16:01 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[pop3]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=237</guid>
		<description><![CDATA[<p><strong>To Test POP3</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 110 (xxx = mailserver)<br />
<span style="color: #008000;">+OK Hello there.</span><br />
user <strong>USERNAME</strong><br />
<span style="color: #008000;">+OK Password required.</span><br />
pass <strong>PASSWORD<br />
</strong><span style="color: #008000;">+OK logged in.</span><br />
stat<br />
<span style="color: #008000;">+OK (Information about your mail)</span><br />
quit<br />
<span style="color: #008000;">+OK Bye-bye.</span></p>
<p><span id="more-237"></span><strong>To Test IMAP</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 143<br />
<span style="color: #008000;">* OK (welcome message)</span><br />
a login <strong>USERNAME PASSWORD<br />
</strong><span style="color: #008000;">a OK login Ok.</span><br />
a examine inbox<br />
<span style="color: #008000;">(Information about mail)</span><br />
a logout<br />
<span style="color: #008000;">a OK LOGOUT completed</span></p>
<p><strong>To Test POP3 over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:995<br />
Commands as above</p>
<p><strong>To Test IMAP over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:993<br />
Commands as above</p>
]]></description>
			<content:encoded><![CDATA[<p><strong>To Test POP3</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 110 (xxx = mailserver)<br />
<span style="color: #008000;">+OK Hello there.</span><br />
user <strong>USERNAME</strong><br />
<span style="color: #008000;">+OK Password required.</span><br />
pass <strong>PASSWORD<br />
</strong><span style="color: #008000;">+OK logged in.</span><br />
stat<br />
<span style="color: #008000;">+OK (Information about your mail)</span><br />
quit<br />
<span style="color: #008000;">+OK Bye-bye.</span></p>
<p><span id="more-237"></span><strong>To Test IMAP</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 143<br />
<span style="color: #008000;">* OK (welcome message)</span><br />
a login <strong>USERNAME PASSWORD<br />
</strong><span style="color: #008000;">a OK login Ok.</span><br />
a examine inbox<br />
<span style="color: #008000;">(Information about mail)</span><br />
a logout<br />
<span style="color: #008000;">a OK LOGOUT completed</span></p>
<p><strong>To Test POP3 over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:995<br />
Commands as above</p>
<p><strong>To Test IMAP over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:993<br />
Commands as above</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/12/15/basic-pop3-imap-connection-testing-via-telnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Epitaph</title>
		<link>http://klkl.co.uk/2009/12/06/epitaph/</link>
		<comments>http://klkl.co.uk/2009/12/06/epitaph/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 15:44:14 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Words]]></category>
		<category><![CDATA[death]]></category>
		<category><![CDATA[epitaph]]></category>
		<category><![CDATA[last words]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=234</guid>
		<description><![CDATA[<h3 style="text-align: center;">Remember now as you pass by,</h3>
<h3 style="text-align: center;">that as you are so once was I.</h3>
<h3 style="text-align: center;">And as I am you too shall be,</h3>
<h3 style="text-align: center;">prepare ye then to follow me.</h3>
]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: center;">Remember now as you pass by,</h3>
<h3 style="text-align: center;">that as you are so once was I.</h3>
<h3 style="text-align: center;">And as I am you too shall be,</h3>
<h3 style="text-align: center;">prepare ye then to follow me.</h3>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/12/06/epitaph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trespassers Will NOT Be Prosecuted</title>
		<link>http://klkl.co.uk/2009/10/09/trespassers-will-not-be-prosecuted/</link>
		<comments>http://klkl.co.uk/2009/10/09/trespassers-will-not-be-prosecuted/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 22:08:27 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Words]]></category>
		<category><![CDATA[civil]]></category>
		<category><![CDATA[criminal]]></category>
		<category><![CDATA[law]]></category>
		<category><![CDATA[QI]]></category>
		<category><![CDATA[trespass]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=223</guid>
		<description><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="trespassers" src="http://klkl.co.uk/wp-content/uploads/2009/10/FX59.png" alt="trespassers" width="300" height="226" /></p>
<p>Only a breach of criminal law may lead to prosecution. Breach of civil law, however, could well lead to the defendant being sued.</p>
<p>As trespass is a civil offence and not a criminal one then trespassers will most certainly not be prosecuted.</p>
<p>This post is attributed to my brother whom provided the information in the same conversation he tricked me into mis-answering a QI like question. More on that story later.</p>
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="trespassers" src="http://klkl.co.uk/wp-content/uploads/2009/10/FX59.png" alt="trespassers" width="300" height="226" /></p>
<p>Only a breach of criminal law may lead to prosecution. Breach of civil law, however, could well lead to the defendant being sued.</p>
<p>As trespass is a civil offence and not a criminal one then trespassers will most certainly not be prosecuted.</p>
<p>This post is attributed to my brother whom provided the information in the same conversation he tricked me into mis-answering a QI like question. More on that story later.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/10/09/trespassers-will-not-be-prosecuted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GIMP on Mac OS Focus Double Click Fix</title>
		<link>http://klkl.co.uk/2009/10/08/gimp-on-mac-os-focus-double-click-fix/</link>
		<comments>http://klkl.co.uk/2009/10/08/gimp-on-mac-os-focus-double-click-fix/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 19:53:20 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[GIMP]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=218</guid>
		<description><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-220 aligncenter" title="Wilber" src="http://klkl.co.uk/wp-content/uploads/2009/10/gimp.png" alt="GIMP Mascot" width="200" height="145" /></p>
<p>If you&#8217;ve ever used the great GNU Image Manipulation Program, GIMP, on a Mac then you&#8217;ll no doubt have been frustrated with the way X11 seems to handle window focus. Fortunately there is a solution and its just a couple of simple terminal commands away&#8230;</p>
<p>When selecting tools from their dialog in GIMP on your Mac then you are required to click once to give that window focus and again to actually select the tool you require. The same two clicks are required again to actually use your tool.  You can either imagine or know first hand how annoying this becomes and its a shame for such a great piece of software to be blighted by this issue so lets fix it.</p>
<p>Firstly you&#8217;ll want to open your terminal (who could live without it&#8230; mine&#8217;s almost always open!). Then you want to enter either of the following commands depending on whether you&#8217;ve got XQuartz updates (and if you&#8217;re not sure just do both sets).</p>
<p><span id="more-218"></span></p>
<p><strong>Without XQuartz updates:</strong></p>
<ul>
<li>defaults write com.apple.x11 wm_ffm -bool false</li>
<li>defaults write com.apple.x11 wm_click_through -bool true</li>
</ul>
<p><strong>With XQuartz updates:</strong></p>
<ul>
<li>defaults write org.x.x11 wm_ffm -bool false</li>
<li>defaults write org.x.x11 wm_click_through -bool true</li>
</ul>
<p>You should now find that you only need the proper amount (2) of clicks to select and use your tool of choice. This leaves you free to spend your time bothering about something else that annoys you like having to Cmd-Tab to X11 instead of GIMP when you&#8217;ve been switching between apps!</p>
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-220 aligncenter" title="Wilber" src="http://klkl.co.uk/wp-content/uploads/2009/10/gimp.png" alt="GIMP Mascot" width="200" height="145" /></p>
<p>If you&#8217;ve ever used the great GNU Image Manipulation Program, GIMP, on a Mac then you&#8217;ll no doubt have been frustrated with the way X11 seems to handle window focus. Fortunately there is a solution and its just a couple of simple terminal commands away&#8230;</p>
<p>When selecting tools from their dialog in GIMP on your Mac then you are required to click once to give that window focus and again to actually select the tool you require. The same two clicks are required again to actually use your tool.  You can either imagine or know first hand how annoying this becomes and its a shame for such a great piece of software to be blighted by this issue so lets fix it.</p>
<p>Firstly you&#8217;ll want to open your terminal (who could live without it&#8230; mine&#8217;s almost always open!). Then you want to enter either of the following commands depending on whether you&#8217;ve got XQuartz updates (and if you&#8217;re not sure just do both sets).</p>
<p><span id="more-218"></span></p>
<p><strong>Without XQuartz updates:</strong></p>
<ul>
<li>defaults write com.apple.x11 wm_ffm -bool false</li>
<li>defaults write com.apple.x11 wm_click_through -bool true</li>
</ul>
<p><strong>With XQuartz updates:</strong></p>
<ul>
<li>defaults write org.x.x11 wm_ffm -bool false</li>
<li>defaults write org.x.x11 wm_click_through -bool true</li>
</ul>
<p>You should now find that you only need the proper amount (2) of clicks to select and use your tool of choice. This leaves you free to spend your time bothering about something else that annoys you like having to Cmd-Tab to X11 instead of GIMP when you&#8217;ve been switching between apps!</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/10/08/gimp-on-mac-os-focus-double-click-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Fill Down In Excel Mac</title>
		<link>http://klkl.co.uk/2009/07/30/howto-fill-down-in-excel-mac/</link>
		<comments>http://klkl.co.uk/2009/07/30/howto-fill-down-in-excel-mac/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 17:29:59 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[shortcut]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=213</guid>
		<description><![CDATA[<h1 style="text-align: center;"><span style="color: #333333;">Ctrl + D</span></h1>
]]></description>
			<content:encoded><![CDATA[<h1 style="text-align: center;"><span style="color: #333333;">Ctrl + D</span></h1>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/07/30/howto-fill-down-in-excel-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel Mac Equivalent to F2 In Windows</title>
		<link>http://klkl.co.uk/2009/07/19/excel-mac-equivalent-to-f2-in-windows/</link>
		<comments>http://klkl.co.uk/2009/07/19/excel-mac-equivalent-to-f2-in-windows/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 19:54:39 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[F2]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[shortcut]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=209</guid>
		<description><![CDATA[<h1 style="text-align: center;"><strong><span style="color: #333333;">Ctrl + U</span></strong></h1>
]]></description>
			<content:encoded><![CDATA[<h1 style="text-align: center;"><strong><span style="color: #333333;">Ctrl + U</span></strong></h1>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/07/19/excel-mac-equivalent-to-f2-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Equivalent to the SQL IN (&#8230;) Statement</title>
		<link>http://klkl.co.uk/2009/07/18/php-equivalent-to-the-sql-in-statement/</link>
		<comments>http://klkl.co.uk/2009/07/18/php-equivalent-to-the-sql-in-statement/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 13:21:28 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pharmacy]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[dm+d]]></category>
		<category><![CDATA[NHS]]></category>
		<category><![CDATA[nhsbsa]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=203</guid>
		<description><![CDATA[<p>Recently I&#8217;ve been looking at using the NHS Business Service Authority&#8217;s Dictionary of Medicines and Devices for my own nefarious purposes. The Information (data that has meaning) is distributed as XML files.</p>
<p>I haven&#8217;t come across a database design for the data so I&#8217;ve come up with my own and to import the data into it I&#8217;ve been using PHP&#8217;s XML DOM functionality (<a title="Parse XML in PHP" href="http://klkl.co.uk/2007/10/23/how-to-parse-an-xml-file-using-php-part-1/" target="_blank">a different technique than I described in my earlier post &#8230;</a>). Because the files are published according to specified standards I decided to save myself some programming time by adopting their terminology for my database design so that I could write very little code to prepare the data and insert it into the database.</p>
<p>However, I wanted to test that the nodes I was expecting were what was being prepared for insertion into the database. One reason it may not is if the XML file has been reformatted with indents (<a title="HowTo Quickly Indent XML" href="http://klkl.co.uk/2009/07/14/how-to-indent-xml-quickly/" target="_blank">mentioned in this post</a>) What I needed was an equivalent to SQLs IN statement. The solution is to use PHP&#8217;s in_array() function like so&#8230;</p>
<p style="padding-left: 30px;"><strong>$desirable_values = array(&#8217;CD&#8217;, &#8216;CDDT&#8217;, &#8216;CDPREV&#8217;, &#8216;DESC&#8217;);<br />
if ( in_array( $variable_to_test, $desirable_values) ) {<br />
//Do Your Stuff<br />
}</strong></p>
<p>It saves you having to test if your variable is equal to each of the variables you want to test thus making your code cleaner and shorter.</p>
]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been looking at using the NHS Business Service Authority&#8217;s Dictionary of Medicines and Devices for my own nefarious purposes. The Information (data that has meaning) is distributed as XML files.</p>
<p>I haven&#8217;t come across a database design for the data so I&#8217;ve come up with my own and to import the data into it I&#8217;ve been using PHP&#8217;s XML DOM functionality (<a title="Parse XML in PHP" href="http://klkl.co.uk/2007/10/23/how-to-parse-an-xml-file-using-php-part-1/" target="_blank">a different technique than I described in my earlier post &#8230;</a>). Because the files are published according to specified standards I decided to save myself some programming time by adopting their terminology for my database design so that I could write very little code to prepare the data and insert it into the database.</p>
<p>However, I wanted to test that the nodes I was expecting were what was being prepared for insertion into the database. One reason it may not is if the XML file has been reformatted with indents (<a title="HowTo Quickly Indent XML" href="http://klkl.co.uk/2009/07/14/how-to-indent-xml-quickly/" target="_blank">mentioned in this post</a>) What I needed was an equivalent to SQLs IN statement. The solution is to use PHP&#8217;s in_array() function like so&#8230;</p>
<p style="padding-left: 30px;"><strong>$desirable_values = array(&#8217;CD&#8217;, &#8216;CDDT&#8217;, &#8216;CDPREV&#8217;, &#8216;DESC&#8217;);<br />
if ( in_array( $variable_to_test, $desirable_values) ) {<br />
//Do Your Stuff<br />
}</strong></p>
<p>It saves you having to test if your variable is equal to each of the variables you want to test thus making your code cleaner and shorter.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/07/18/php-equivalent-to-the-sql-in-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing the Tilde (~) Character From the Address of Locally Hosted Sites on Mac OS X</title>
		<link>http://klkl.co.uk/2009/07/17/removing-the-tilde-character-from-the-address-of-locally-hosted-sites-on-mac-os-x/</link>
		<comments>http://klkl.co.uk/2009/07/17/removing-the-tilde-character-from-the-address-of-locally-hosted-sites-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 19:08:42 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ln]]></category>
		<category><![CDATA[tilde]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=194</guid>
		<description><![CDATA[<p>I&#8217;ve been working on some sites locally on my Mac but by default the files are stored in a directory in the individuals user account called Sites and the address you&#8217;ve got to type into your browser is http://localhost/~username/etc&#8230; this annoyed me because I didn&#8217;t want to have to type the tilde character in the address and also that I had to have the files showing in a subdirectories of my user. I couldn&#8217;t be doing with it, I wanted to have addresses like &#8216;http://localhost/subdomain/&#8217; and the solution of course is to use symbolic links.</p>
<p><span id="more-194"></span></p>
<p>The way I did it was to have various directories in the /Users/username/Sites directory as is the normal set up but to have a symbolic link for each project that I wanted to have a better looking URL for so for example if my PHP My Admin was contained in the directory /Users/username/Sites/phpma then I would create a symbolic link to the directory /Library/WebServer/Documents/ using the command&#8230;</p>
<ul>
<li><strong>ln -s /Users/username/Sites/phpma /Library/WebServer/Documents/phpma</strong></li>
</ul>
<p>Et Voila&#8230; I can now use and bookmark a shorter and less visually offensive URL to the sites I&#8217;m working on.</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on some sites locally on my Mac but by default the files are stored in a directory in the individuals user account called Sites and the address you&#8217;ve got to type into your browser is http://localhost/~username/etc&#8230; this annoyed me because I didn&#8217;t want to have to type the tilde character in the address and also that I had to have the files showing in a subdirectories of my user. I couldn&#8217;t be doing with it, I wanted to have addresses like &#8216;http://localhost/subdomain/&#8217; and the solution of course is to use symbolic links.</p>
<p><span id="more-194"></span></p>
<p>The way I did it was to have various directories in the /Users/username/Sites directory as is the normal set up but to have a symbolic link for each project that I wanted to have a better looking URL for so for example if my PHP My Admin was contained in the directory /Users/username/Sites/phpma then I would create a symbolic link to the directory /Library/WebServer/Documents/ using the command&#8230;</p>
<ul>
<li><strong>ln -s /Users/username/Sites/phpma /Library/WebServer/Documents/phpma</strong></li>
</ul>
<p>Et Voila&#8230; I can now use and bookmark a shorter and less visually offensive URL to the sites I&#8217;m working on.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/07/17/removing-the-tilde-character-from-the-address-of-locally-hosted-sites-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Indent XML Quickly</title>
		<link>http://klkl.co.uk/2009/07/14/how-to-indent-xml-quickly/</link>
		<comments>http://klkl.co.uk/2009/07/14/how-to-indent-xml-quickly/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 19:42:51 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Pharmacy]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[dm+d]]></category>
		<category><![CDATA[indent]]></category>
		<category><![CDATA[libxml]]></category>
		<category><![CDATA[nhsbsa]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=189</guid>
		<description><![CDATA[<p>I&#8217;ve recently registered for accesss to the NHS&#8217;s dictionary of medicines and devices (dm+d). This was primarily to see what format the data was stored in and then to see if there was a way of utilising it in a cool webapp.</p>
<p>I downloaded the current release (its updated weekly) and unpacked the 5MB archive to reveal some XML and related files. Some of the files are huge (up to 32MB each and ~70MB in total) and there was no way a traditional program was going to mannage. I tried a few in fact and they all devastated my 2GB RAM and were generally unusable.</p>
<p>Time for a command line solution&#8230; VIM the open source text editor. Its extremely powerful and customisable but using it takes a little getting used to. VIM was able to open with only a slight delay and navigate these huge files. The next problem for me was being able to read them.</p>
<p>In theory it shouldn&#8217;t matter what indenting there is in an XML file as it doesn&#8217;t contain any data but I find its a lot easier to read the files if they&#8217;re &#8216;cleanly&#8217; indented. I began wondering how I was going to solve the problem and thought of a few ideas&#8230; a script (PERL, PHP, shell, other&#8230;) but none of those came to fruition. After some searching I came across <a href="http://xmlsoft.org/">libxml</a>.</p>
<p>You can download and compile from source if you wish but I decided to download a pre-built version from <a href="http://www.explain.com.au/oss/libxml2xslt.html">explain.com</a> it was pretty good and another page I came across on <a href="http://www.entropy.ch/blog/Developer/2008/04/23/XML-Pretty-Printing-in-BBEdit-and-vi-With-xmllint.html">entropy.ch</a> explained how to use it within Vim to indent my files super quick.</p>
<p>Here&#8217;s what you do&#8230;</p>
<ul>
<li>To format type this sequence
<ul>
<li>:%!xmllint &#8211;format -</li>
</ul>
</li>
<li>Or mark the area visually and then type
<ul>
<li>!xmllint &#8211;format -</li>
</ul>
</li>
</ul>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently registered for accesss to the NHS&#8217;s dictionary of medicines and devices (dm+d). This was primarily to see what format the data was stored in and then to see if there was a way of utilising it in a cool webapp.</p>
<p>I downloaded the current release (its updated weekly) and unpacked the 5MB archive to reveal some XML and related files. Some of the files are huge (up to 32MB each and ~70MB in total) and there was no way a traditional program was going to mannage. I tried a few in fact and they all devastated my 2GB RAM and were generally unusable.</p>
<p>Time for a command line solution&#8230; VIM the open source text editor. Its extremely powerful and customisable but using it takes a little getting used to. VIM was able to open with only a slight delay and navigate these huge files. The next problem for me was being able to read them.</p>
<p>In theory it shouldn&#8217;t matter what indenting there is in an XML file as it doesn&#8217;t contain any data but I find its a lot easier to read the files if they&#8217;re &#8216;cleanly&#8217; indented. I began wondering how I was going to solve the problem and thought of a few ideas&#8230; a script (PERL, PHP, shell, other&#8230;) but none of those came to fruition. After some searching I came across <a href="http://xmlsoft.org/">libxml</a>.</p>
<p>You can download and compile from source if you wish but I decided to download a pre-built version from <a href="http://www.explain.com.au/oss/libxml2xslt.html">explain.com</a> it was pretty good and another page I came across on <a href="http://www.entropy.ch/blog/Developer/2008/04/23/XML-Pretty-Printing-in-BBEdit-and-vi-With-xmllint.html">entropy.ch</a> explained how to use it within Vim to indent my files super quick.</p>
<p>Here&#8217;s what you do&#8230;</p>
<ul>
<li>To format type this sequence
<ul>
<li>:%!xmllint &#8211;format -</li>
</ul>
</li>
<li>Or mark the area visually and then type
<ul>
<li>!xmllint &#8211;format -</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/07/14/how-to-indent-xml-quickly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
