<?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>Vim, Cygwin, MySQL &#38; Zsh Tips</title>
	<atom:link href="http://zzapper.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://zzapper.co.uk</link>
	<description></description>
	<lastBuildDate>Fri, 12 Mar 2010 20:13:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Converting a Textified File Name back into Title Case</title>
		<link>http://zzapper.co.uk/converting-a-textified-file-name-back-into-title-case/</link>
		<comments>http://zzapper.co.uk/converting-a-textified-file-name-back-into-title-case/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 22:25:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[zsh]]></category>
		<category><![CDATA[textified]]></category>
		<category><![CDATA[title case]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/converting-a-textified-file-name-back-into-title-case/</guid>
		<description><![CDATA[This could easily be done with Perl but here is a zsh solution
I want to convert a textified string to a Title Case Phrase
>
> eg
> fred-goat-dog.jpg to Fred Goat Dog
>    
% print ${${(Cs:-:):-fred-goat-dog.jpg}%.*}
Fred Goat Dog
This curiously uses a smiley face though
foo=fred-goat-dog.jpg
echo ${(C)foo:gs/-/ /:r} might be more elegant
From the zsh newsgroup (RD&#038;MM)
and to [...]]]></description>
			<content:encoded><![CDATA[<p>This could easily be done with Perl but here is a zsh solution</p>
<p>I want to convert a textified string to a Title Case Phrase<br />
><br />
> eg<br />
> fred-goat-dog.jpg to Fred Goat Dog<br />
>    </p>
<p>% print ${${(Cs:-:):-fred-goat-dog.jpg}%.*}<br />
Fred Goat Dog</p>
<p>This curiously uses a smiley face though<br />
foo=fred-goat-dog.jpg<br />
echo ${(C)foo:gs/-/ /:r} might be more elegant<br />
From the zsh newsgroup (RD&#038;MM)</p>
<p>and to textify a phrase</p>
<p>s=&#8217;Fred Goat Dog&#8217;<br />
print ${(L)s:gs/ /-/}.jpg<br />
or<br />
print ${(L)s// /-}.jpg</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/converting-a-textified-file-name-back-into-title-case/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful VIM Abbreviations for Debugging Perl</title>
		<link>http://zzapper.co.uk/useful-vim-abbreviations-for-debugging-perl/</link>
		<comments>http://zzapper.co.uk/useful-vim-abbreviations-for-debugging-perl/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 21:51:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=87</guid>
		<description><![CDATA[
iab perlb  print &#8220;&#60;p>debug ::: $_ :: $&#8217; :: $`  line &#8220;.__LINE__.&#8221;\n&#8221;;exit;
iab perlbb print &#8220;&#60;p>debug ::: &#60;C-R>a  line &#8220;.__LINE__.&#8221;\n&#8221;;exit;
iab perlbd do{print &#8220;&#60;p>debug :: &#60;C-R>a  line &#8220;.__LINE__.&#8221;\n&#8221;;exit} if $_ =~ /\w\w/i;
iab perld use Data::Dumper; print Dumper %ENV;
the &#60;C-R>a automatically inserts whatever variable you had previously stored in register a

]]></description>
			<content:encoded><![CDATA[<div class=box>
iab perlb  print &#8220;&lt;p>debug ::: $_ :: $&#8217; :: $`  line &#8220;.__LINE__.&#8221;\n&#8221;;exit;<br />
iab perlbb print &#8220;&lt;p>debug ::: &lt;C-R>a  line &#8220;.__LINE__.&#8221;\n&#8221;;exit;<br />
iab perlbd do{print &#8220;&lt;p>debug :: &lt;C-R>a  line &#8220;.__LINE__.&#8221;\n&#8221;;exit} if $_ =~ /\w\w/i;<br />
iab perld use Data::Dumper; print Dumper %ENV;</p>
<p>the &lt;C-R>a automatically inserts whatever variable you had previously stored in register a
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/useful-vim-abbreviations-for-debugging-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copying all but today&#8217;s files</title>
		<link>http://zzapper.co.uk/copying-all-but-todays-files/</link>
		<comments>http://zzapper.co.uk/copying-all-but-todays-files/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 23:23:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=85</guid>
		<description><![CDATA[I&#8217;d put some new files into a folder before remembering to mothball all the old files:-
Here is a zsh solution:-
&#62;mv *.*(^m-1)   ./old
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d put some new files into a folder before remembering to mothball all the old files:-</p>
<p>Here is a zsh solution:-</p>
<p>&gt;mv *.*(^m-1)   ./old</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/copying-all-but-todays-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zsh wonderful use of dirs,popd,pushp, cd ~5</title>
		<link>http://zzapper.co.uk/zsh-wonderful-use-of-dirspopdpushp-cd-5/</link>
		<comments>http://zzapper.co.uk/zsh-wonderful-use-of-dirspopdpushp-cd-5/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 18:36:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[shell tips]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=82</guid>
		<description><![CDATA[I&#8217;ve never got the hang of popd &#38; pushd they seemed a bit pointless. zsh however has extended their abilities eg:-
&#62; dirs -v    # number and list your recent directories one per line
&#62; cd ~5     # cd to directory 5 in the directory stack
&#62; cd -&#60;tab&#62;    # the tab complete lists the directory stack then [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never got the hang of popd &amp; pushd they seemed a bit pointless. zsh however has extended their abilities eg:-</p>
<p>&gt; dirs -v    # number and list your recent directories one per line</p>
<p>&gt; cd ~5     # cd to directory 5 in the directory stack</p>
<p>&gt; cd -&lt;tab&gt;    # the tab complete lists the directory stack then type a digit to select the one you require (saves you having to do a dirs -v in the first place</p>
<p>I have to work in very complicated directory structures so this will be fantastically useful.</p>
<p>#don&#8217;t forget the zsh cd substitute command</p>
<p>&gt; cd olddir newdir</p>
<p>eg you are in</p>
<p>/inetpub/wwwroot/www.livesite.co.uk/products/</p>
<p>&gt; cd live test</p>
<p>/inetpub/wwwroot/www.testsite.co.uk/products/</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/zsh-wonderful-use-of-dirspopdpushp-cd-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Git for Document/Software Version Control</title>
		<link>http://zzapper.co.uk/using-git-for-documentsoftware-version-control/</link>
		<comments>http://zzapper.co.uk/using-git-for-documentsoftware-version-control/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 19:52:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[gitk]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=77</guid>
		<description><![CDATA[I had been using my own ad-hoc system for years but recently started using CVS to maintain a history of my file and document changes. I was quite happy with CVS but everyone told me I should be using Git instead.  Git seems to be simpler and more intuitive. I can set up git for [...]]]></description>
			<content:encoded><![CDATA[<p>I had been using my own ad-hoc system for years but recently started using CVS to maintain a history of my file and document changes. I was quite happy with CVS but everyone told me I should be using Git instead.  Git seems to be simpler and more intuitive. I can set up git for a folder or project very quickly. You just need the following 5 commands to get going</p>
<p>git init       (set up git for the current directory)<br />
git add *.php   (add all your php files or whatever)<br />
git commit -m &#8220;first version&#8221;    (also need to commit all your existing php files)<br />
vi index.php (make a few changes)<br />
git commit -a -m &#8220;Added new date feature&#8221;   (do this periodically to maintain version control)<br />
<strong></strong></p>
<p><strong>gitk </strong>is a simple TK Gui which allows you to review you versions etc. I am delighted to have version control, all I have to do is remember to do a &gt; git commit -a -m &#8220;Added new date feature&#8221; every now and again (eg daily)</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/using-git-for-documentsoftware-version-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing Remembered Password in Firefox</title>
		<link>http://zzapper.co.uk/viewing-remembered-password-in-firefox/</link>
		<comments>http://zzapper.co.uk/viewing-remembered-password-in-firefox/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 18:09:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/viewing-remembered-password-in-firefox/</guid>
		<description><![CDATA[You know the frustration of being able to log into a website because your browser has
remembered the password but you have forgotten it and so cannot login from another pc.
Well FireFox will show them to you
options->security->Saved Passwords then click Show Passwords
You may want to consider the security implications as well, to disable this feature while
retaining [...]]]></description>
			<content:encoded><![CDATA[<p>You know the frustration of being able to log into a website because your browser has<br />
remembered the password but you have forgotten it and so cannot login from another pc.<br />
Well FireFox will show them to you</p>
<p>options->security->Saved Passwords then click Show Passwords</p>
<p>You may want to consider the security implications as well, to disable this feature while<br />
retaining the ability of the browser to remember passwords</p>
<p>go to</p>
<p>options->security-set master password</p>
<p>I personally never let a browser remember say my PayPal password</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/viewing-remembered-password-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>copy a file while modifying a value inside it</title>
		<link>http://zzapper.co.uk/copy-a-file-while-modifying-a-value-inside-it/</link>
		<comments>http://zzapper.co.uk/copy-a-file-while-modifying-a-value-inside-it/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:20:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=68</guid>
		<description><![CDATA[The sed does the filtering, you should be able to see how to adapt this to your own requirements
So I want to duplicate init.php while changing the value of a flag inside it for each copy
cat init.php &#124; sed s/flag=2/flag=3/ &#62; dir3/init.php
cat init.php &#124; sed s/flag=2/flag=4/ &#62; dir4/init.php
If you see the first comment Bawdo suggests [...]]]></description>
			<content:encoded><![CDATA[<p>The sed does the filtering, you should be able to see how to adapt this to your own requirements</p>
<p>So I want to duplicate init.php while changing the value of a flag inside it for each copy</p>
<p>cat init.php | sed s/flag=2/flag=3/ &gt; dir3/init.php<br />
cat init.php | sed s/flag=2/flag=4/ &gt; dir4/init.php</p>
<p>If you see the first comment Bawdo suggests rightly that this is a UUOC</p>
<p>sed &#8220;s/flag=2/flag=4/&#8221;  init.php &gt; dir4/init.php</p>
<p>I&#8217;ve always underused sed unfortunately</p>
<p>which then can written (zsh)</p>
<p>for i in {3,4}; sed s/flag=2/flag=$i/ init.php &gt; dir$i/init.php</p>
<p>sed stands for stream editor and therefore cannot do an in place edit this is where perl thrives</p>
<p>perl -p -i -e &#8217;s/\surname\b/form_surname/g&#8217;    *.php</p>
<p>or safer</p>
<p>perl -p -i.bak -e &#8217;s/\b23\b/34/g&#8217;  fred.php  (creates a backup of each file eg fred.bak)</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/copy-a-file-while-modifying-a-value-inside-it/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Forgetting How You Solved a Problem the First Time</title>
		<link>http://zzapper.co.uk/forgetting-how-you-solved-a-problem-the-first-time/</link>
		<comments>http://zzapper.co.uk/forgetting-how-you-solved-a-problem-the-first-time/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 20:55:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=65</guid>
		<description><![CDATA[Today I had to update a 12 year old Higgledy-piggledy Microsoft Access Database application to work with the year 2010 instead of 2009 amongst other things . The original designer had needlessly hard-coded the current year&#8217;s and previous year&#8217;s date anyway I had some notes from when I did it 12 months ago which described [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to update a 12 year old Higgledy-piggledy Microsoft Access Database application to work with the year 2010 instead of 2009 amongst other things . The original designer had needlessly hard-coded the current year&#8217;s and previous year&#8217;s date anyway I had some notes from when I did it 12 months ago which described what values need changing, but could I find where those values were defined? My notes were not specific enough. The REAL PROBLEM was that last year I must have altered these values without too much of a sweat and so not taken much trouble to note down exactly.</p>
<p>Fortunately I remembered the wonderful <a title="Stackoverflow solve technical problems" href="http://stackoverflow.com/users/94335/zzapper" target="_blank">stackoverflow.com</a> website. I posed my question and got several useful pointers in a few minutes and these helped me find the solution which was to set the option search whole project.</p>
<p>This is actually a generic problem in life when we realize that we&#8217;ve been doing something automatically and been unconscious of how we did it.</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/forgetting-how-you-solved-a-problem-the-first-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Ubuntu to Delete Windows 7 Trojans</title>
		<link>http://zzapper.co.uk/using-ubuntu-to-delete-windows-7-trojans/</link>
		<comments>http://zzapper.co.uk/using-ubuntu-to-delete-windows-7-trojans/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 15:20:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[trojans]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=59</guid>
		<description><![CDATA[My broadband service provider informed me that my network IP address was issuing massive amounts of spam email. To my horror I realised it was my own PC. I&#8217;d recently done a lot of work double checking my PC with both Sophus and AVG so I thought I was clean. The Service provider recommended that [...]]]></description>
			<content:encoded><![CDATA[<p>My broadband service provider informed me that my network IP address was issuing massive amounts of spam email. To my horror I realised it was my own PC. I&#8217;d recently done a lot of work double checking my PC with both Sophus and AVG so I thought I was clean. The Service provider recommended that I use Avast and that I do a <strong>DOS Level Search from Boot</strong>. The advantage of doing  this is that viruses and <strong>Trojans </strong>have a lot less chance of hiding themselves somewhere in Windows. Well Avast spotted quite a few problems including an <strong>iframe </strong>Trojan in a back-up of a website but nothing that solved my problem. Well I ran avast several times and then it asked to do another Boot search and then alerted me to a trojan in a driver file micbd.sys c:\windows\System32\drivers\micbd.sys unfortunately the Trojan would not let me delete it from DOS or from Windows whatever, so I used my old trick I booted from a Ubuntu CD this gave me access to the Windows File System and I deleted the offending micbd.sys driver. Now have fought off a couple of Trojans recently I can give you a <strong>clue</strong> in both cases the first thing I noticed was that the virus checker listed the eventual file as <strong>UNOPENABLE</strong></p>
<p>So two tips you may find useful:-</p>
<ul>
<li> Use a Ubuntu DVD to rescue, backup,  or repair a damaged Windows System (do not install Ubuntu boot from the CD)</li>
<li> When looking for a Trojan or Virus on your Windows PC be very suspicious that your virus checker marks as <strong>inaccessible</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/using-ubuntu-to-delete-windows-7-trojans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP : Read XML File with simplexml_load_file Test Script</title>
		<link>http://zzapper.co.uk/php-read-xml-file-with-simplexml_load_file-test-script/</link>
		<comments>http://zzapper.co.uk/php-read-xml-file-with-simplexml_load_file-test-script/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 13:41:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=55</guid>
		<description><![CDATA[
&#60;?php
/* create test.xml from following lines
&#60;?xml version="1.0" encoding="ISO-8859-1"?>
&#60;note>
&#60;to>Fred&#60;/to>
&#60;from>Joe&#60;/from>
&#60;heading>Reminder&#60;/heading>
&#60;body>Meeting Tomorrow&#60;/body>
&#60;/note>
*/
error_reporting(E_ALL);
if (!function_exists('simplexml_load_file')) exit('&#60;br>function does not exist');
if (file_exists('test.xml'))
  {
  $xml = @simplexml_load_file('test.xml');
  echo "&#60;pre>";var_dump($xml);
  }
else { exit('&#60;br>Error could not locate XML file'); }
?> 

]]></description>
			<content:encoded><![CDATA[<p><code><br />
&lt;?php<br />
/* create test.xml from following lines<br />
&lt;?xml version="1.0" encoding="ISO-8859-1"?><br />
&lt;note><br />
&lt;to>Fred&lt;/to><br />
&lt;from>Joe&lt;/from><br />
&lt;heading>Reminder&lt;/heading><br />
&lt;body>Meeting Tomorrow&lt;/body><br />
&lt;/note><br />
*/<br />
error_reporting(E_ALL);<br />
if (!function_exists('simplexml_load_file')) exit('&lt;br>function does not exist');<br />
if (file_exists('test.xml'))<br />
  {<br />
  $xml = @simplexml_load_file('test.xml');<br />
  echo "&lt;pre>";var_dump($xml);<br />
  }<br />
else { exit('&lt;br>Error could not locate XML file'); }<br />
?> </p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/php-read-xml-file-with-simplexml_load_file-test-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
