<?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>ieatpenguin &#187; Software</title>
	<atom:link href="http://r-dunn.co.uk/ieatpenguin/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://r-dunn.co.uk/ieatpenguin</link>
	<description>an odd little man in an odd little world</description>
	<lastBuildDate>Mon, 26 Jul 2010 14:57:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>MSSQL &#8211; How To Output To A File</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/sql/o-mssql-how-to-output-to-a-file/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/sql/o-mssql-how-to-output-to-a-file/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 08:15:07 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=627</guid>
		<description><![CDATA[There is a very, very simple one liner within MySQL to dump the results of a query into a text file. Nothing so simple exists within MSSQL, but there are fairly easy workarounds. Using BCP, one can use the xp_cmdshell to pass the results into the desired file. use DatabaseName go declare @FileName varchar(50) declare [...]]]></description>
			<content:encoded><![CDATA[<p>There is a very, very simple one liner within MySQL to dump the results of a query into a text file. Nothing so simple exists within MSSQL, but there are fairly easy workarounds. Using BCP, one can use the xp_cmdshell to pass the results into the desired file.</p>
<blockquote><p>use <em>DatabaseName</em><br />
go</p>
<p>declare @FileName varchar(50)<br />
declare @bcpCommand varchar(2000)</p>
<p>set @FileName = REPLACE(&#8216;c:\temp\bcp\postcodes_&#8217;+CONVERT(char(8),GETDATE(),1)+&#8217;.csv&#8217;,'/&#8217;,'-&#8217;)</p>
<p>set @bcpCommand = &#8216;bcp &#8220;select left(postcode,4), count(*) from DatabaseName..TableName where customersequence = 0 group by left(postcode,4) order by count(*) desc&#8221; queryout &#8220;&#8216;<br />
set @bcpCommand = @bcpCommand + @FileName + &#8216;&#8221; -U username -P password -c&#8217;</p>
<p>EXEC master..xp_cmdshell @bcpCommand</p></blockquote>
<p>This dumps a load of postcode information, based on usage, into a csv file in c:\temp\bcp. What the query is doesn&#8217;t really matter, just the bcp commands to provide us with the results in a file of our choosing (.csv in this case).</p>
<p>The @FileName command simply appends the current date to the file in order to keep track of queries.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/sql/o-mssql-how-to-output-to-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Into outfile</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/windows/into-outfile/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/windows/into-outfile/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 14:29:03 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=623</guid>
		<description><![CDATA[Why oh why oh why is there nothing this simple within MSSQL? Sigh.]]></description>
			<content:encoded><![CDATA[<p>Why oh why oh why is there nothing this simple within MSSQL? Sigh.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/windows/into-outfile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounting a network drive in Linux (Ubuntu)</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/mounting-a-network-drive-in-linux/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/mounting-a-network-drive-in-linux/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 12:54:25 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=571</guid>
		<description><![CDATA[This is a very simple thing to do, it isn&#8217;t however as simple as one might think if you are coming from a Windows background, and are used to mapping a network drive from the Tools menu. As a note this is a guide for Ubuntu, although I have it working fine on both Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very simple thing to do, it isn&#8217;t however as simple as one might think if you are coming from a Windows background, and are used to mapping a network drive from the Tools menu. As a note this is a guide for Ubuntu, although I have it working fine on both Ubuntu and Fedora, use the appropriate package manager/command line for Fed and the rest is the same.</p>
<p>First, we need to make sure that samba is installed:</p>
<blockquote><p>sudo apt-get install smbfs</p></blockquote>
<p>Next, we need to make a directory to mount the drive too. As an example, I&#8217;ve just reinstalled my Ubuntu (and Fedora) distribution, and so want to map the music drive on my server. I chose /media/ as the logical place to stick my network drives:</p>
<blockquote><p>sudo mkdir /media/music</p></blockquote>
<p>Next we need to tell the file system table where the drives are, and where to mount them. We also need to include our login credentials (will cover this later).</p>
<blockquote><p>gksudo gedit /etc/fstab</p></blockquote>
<p>Scroll to the bottom of the file and add the following:</p>
<blockquote><p>#Mounting Network Drives<br />
//SERVER/SHARE-NAME /MOUNT-POINT smbfs credentials=/credentials-file-location</p></blockquote>
<p>To make the above make a bit more sense, here is my configuration:</p>
<blockquote><p>//192.168.1.50/Music /media/music smbfs credentials=/home/russell/credentials.smbcredentials<br />
//192.168.1.50/Videos /media/videos smbfs credentials=/home/russell/credentials.smbcredentials<br />
//192.168.1.50/Software /media/software smbfs credentials=/home/russell/credentials.smbcredentials</p></blockquote>
<p>What this will do is to check within the credentials file (more on this at the bottom) your username and password for your server (I am running a Windows Home Server as an example).</p>
<p>Next, we need to make the filesystem mount the drive, which we do simply with:</p>
<blockquote><p>sudo mount -a</p></blockquote>
<p>Finally, we need to make that credentials file. Simply navigate to your chosen directory (I stuck it in my /home/russell directory for ease), create a new file with the following information:</p>
<blockquote><p>username=<em>username</em><br />
password=<em>password</em></p></blockquote>
<p>And save it with the same filename you gave the /fstab/. Thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/mounting-a-network-drive-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync and Bash</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/rsync-and-bash/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/rsync-and-bash/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 10:02:26 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=560</guid>
		<description><![CDATA[Have had an interesting morning delving into Bash, on MSN with Jasper, which is not something I get to do often enough. The upshot was a nice and fairly sophisticated rsync script to backup some files, which I won&#8217;t paste here as it&#8217;s Jaspers baby. However, I did think up a [much] simpler script to [...]]]></description>
			<content:encoded><![CDATA[<p>Have had an interesting morning delving into Bash, on MSN with Jasper, which is not something I get to do often enough.</p>
<p>The upshot was a nice and fairly sophisticated rsync script to backup some files, which I won&#8217;t paste here as it&#8217;s Jaspers baby.</p>
<p>However, I did think up a [much] simpler script to enable a quick and dirty backup of any particular folder to any particular media.</p>
<blockquote><p>
#!/bin/bash<br />
sudo rsync -av &#8211;progress &#8211;delete &#8211;log-file=/dir/$(date +%Y%m%d)_rsync.log /dir /media/dirBackup
</p></blockquote>
<p>You can of course exclude certain files from the backup with:</p>
<blockquote><p>
&#8211;exclude &#8220;/dir/.jpg&#8221;
</p></blockquote>
<p>Naturally, no one wants to type it out everytime and so lets make it into an executable script:</p>
<blockquote><p>
sudo chmod +x /path/rsync-backup.sh
</p></blockquote>
<p>So you now have an executable script you can call whenever you want, or you can of course create a cron job and have it run automatically.</p>
<hr />
Here&#8217;s a slightly more sophisticated backup script that revolves on a weekly basis, and then clears out any backups that are older then this.</p>
<blockquote><p>
#!/bin/sh<br />
# directory to backup<br />
BDIR=/home/$USER</p>
<p># excludes file<br />
EXCLUDES=$HOME/cron/excludes</p>
<p># name of the backup machine<br />
BSERVER=server</p>
<p># password on the backup server<br />
export RSYNC_PASSWORD=</p>
<p># lets get down to it<br />
BACKUPDIR=`date +%A`<br />
OPTS=&#8221;&#8211;force &#8211;ignore-errors &#8211;delete-excluded &#8211;exclude-from=$EXCLUDES<br />
      &#8211;delete &#8211;backup &#8211;backup-dir=/$BACKUPDIR -a&#8221;</p>
<p>export PATH=$PATH:/bin:/usr/bin:/usr/local/bin</p>
<p># the following line clears the last weeks incremental directory<br />
[ -d $HOME/emptydir ] || mkdir $HOME/emptydir<br />
rsync &#8211;delete -a $HOME/emptydir/ $BSERVER::$USER/$BACKUPDIR/<br />
rmdir $HOME/emptydir</p>
<p># now the actual transfer<br />
rsync $OPTS $BDIR $BSERVER::$USER/current
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/rsync-and-bash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Home Server</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/windows-home-server/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/windows-home-server/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 09:58:42 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=509</guid>
		<description><![CDATA[Well I finally got round to installing this on my custom built server, and I&#8217;ll tell you something, I quite like it. It&#8217;s easy to set up, easy to configure and easy to use. No worrying about what raid to use, just automatic duplication if desired. And automatic backups. Just whack in a few drives [...]]]></description>
			<content:encoded><![CDATA[<p>Well I finally got round to installing this on my custom built server, and I&#8217;ll tell you something, I quite like it. It&#8217;s easy to set up, easy to configure and easy to use. No worrying about what raid to use, just automatic duplication if desired. And automatic backups. Just whack in a few drives and away she goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/windows-home-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Haikus</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/microsoft-haikus/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/microsoft-haikus/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 18:03:13 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=246</guid>
		<description><![CDATA[Not mine, but amused me enough to post. The Web site you seek Cannot be located, but Countless more exist. * Chaos reigns within. Reflect, repent, and reboot. Order shall return. * Windows NT crashed. I am the Blue Screen of Death. No one hears your screams. * Stay the patient course. Of little worth [...]]]></description>
			<content:encoded><![CDATA[<p>Not mine, but amused me enough to post.</p>
<p style="padding-left: 30px; text-align: center;">The Web site you seek</p>
<p style="padding-left: 30px; text-align: center;">Cannot be located, but</p>
<p style="padding-left: 30px; text-align: center;">Countless more exist.</p>
<p style="padding-left: 30px; text-align: center;">*</p>
<p style="padding-left: 30px; text-align: center;">Chaos reigns within.</p>
<p style="padding-left: 30px; text-align: center;">Reflect, repent, and reboot.</p>
<p style="padding-left: 30px; text-align: center;">Order shall return.</p>
<p style="padding-left: 30px; text-align: center;">*</p>
<p style="padding-left: 30px; text-align: center;">Windows NT crashed.</p>
<p style="padding-left: 30px; text-align: center;">I am the Blue Screen of Death.</p>
<p style="padding-left: 30px; text-align: center;">No one hears your screams.</p>
<p style="padding-left: 30px; text-align: center;">*</p>
<p style="padding-left: 30px; text-align: center;">Stay the patient course.</p>
<p style="padding-left: 30px; text-align: center;">Of little worth is your ire.</p>
<p style="padding-left: 30px; text-align: center;">The network is down.</p>
<p style="padding-left: 30px; text-align: center;">*</p>
<p style="padding-left: 30px; text-align: center;">A crash reduces</p>
<p style="padding-left: 30px; text-align: center;">Your expensive computer</p>
<p style="padding-left: 30px; text-align: center;">To a simple stone.</p>
<p style="padding-left: 30px; text-align: center;">*</p>
<p style="padding-left: 30px; text-align: center;">Serious error.</p>
<p style="padding-left: 30px; text-align: center;">All shortcuts have disappeared.</p>
<p style="padding-left: 30px; text-align: center;">Screen. Mind. Both are blank.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/microsoft-haikus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Defragging SQL indexes</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/defragging-sql-indexes/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/defragging-sql-indexes/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 11:06:06 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=191</guid>
		<description><![CDATA[Occasionally it will be necessary to defrag table indeces if you run SQL server. A useful little script. USE dbname &#8211;Enter the name of the database you want to reindex DECLARE @TblName varchar(255) Declare @Indexname varchar(50) DECLARE TableCursor CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_type = &#8216;base table&#8217; OPEN TableCursor FETCH NEXT FROM TableCursor [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally it will be necessary to defrag table indeces if you run SQL server. A useful little script.</p>
<p style="padding-left: 30px;">USE dbname &#8211;Enter the name of the database you want to reindex</p>
<p style="padding-left: 30px;">DECLARE @TblName varchar(255)<br />
Declare @Indexname varchar(50)</p>
<p style="padding-left: 30px;">DECLARE TableCursor CURSOR FOR<br />
SELECT table_name FROM information_schema.tables<br />
WHERE table_type = &#8216;base table&#8217;</p>
<p style="padding-left: 30px;">OPEN TableCursor</p>
<p style="padding-left: 30px;">FETCH NEXT FROM TableCursor INTO @TblName<br />
WHILE @@FETCH_STATUS = 0<br />
BEGIN</p>
<p style="padding-left: 30px;">DECLARE INdexCursor CURSOR FOR<br />
SELECT     i.name AS IndexName<br />
FROM         sysobjects o, sysindexes i<br />
WHERE   (o.id = i.id and o.name = @tblName) AND (i.status = 18450 OR   i.status = 2097152)</p>
<p style="padding-left: 30px;">OPEN IndexCursor</p>
<p style="padding-left: 30px;">FETCH NEXT FROM INdexCursor INTO @IndexName<br />
WHILE @@FETCH_STATUS = 0<br />
BEGIN</p>
<p style="padding-left: 30px;">DBCC INDEXDEFRAG (dbname, @tblname, @Indexname)</p>
<p style="padding-left: 30px;">FETCH NEXT FROM INDexcursor INTO @Indexname<br />
END</p>
<p style="padding-left: 30px;">CLOSE IndexCursor</p>
<p style="padding-left: 30px;">DEALLOCATE IndexCursor</p>
<p style="padding-left: 30px;">FETCH NEXT FROM TableCursor INTO @TblName<br />
END</p>
<p style="padding-left: 30px;">CLOSE TableCursor</p>
<p style="padding-left: 30px;">DEALLOCATE TableCursor</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/defragging-sql-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A long read, but worth it.</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/a-long-read-but-worth-it/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/a-long-read-but-worth-it/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 10:49:07 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=157</guid>
		<description><![CDATA[Happy 17th birthday Linux. In the Beginning was the Command Line by Neal Stephenson.]]></description>
			<content:encoded><![CDATA[<p>Happy 17th birthday Linux.</p>
<p><a title="In the Beginning was the Command Line" href="http://artlung.com/smorgasborg/C_R_Y_P_T_O_N_O_M_I_C_O_N.shtml">In the Beginning was the Command Line</a> by Neal Stephenson.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/a-long-read-but-worth-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mozy Online &#8211; Free, secure storage</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/mozy-online-free-secure-storage/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/mozy-online-free-secure-storage/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 13:02:40 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=152</guid>
		<description><![CDATA[Mozy online is a free storage depository, that uses a lightweight program to sync files on your computer. It&#8217;s easy to configure and runs pretty much by itself, and comes with 2GB. If you fancy using it, use my referral code and we both get an extra 256MB of storage.]]></description>
			<content:encoded><![CDATA[<p><a title="Mozy Online" href="https://mozy.com/?ref=S4XE5A" target="_blank">Mozy online</a> is a free storage depository, that uses a lightweight program to sync files on your computer.</p>
<p>It&#8217;s easy to configure and runs pretty much by itself, and comes with 2GB. If you fancy using it, use my <a title="referral" href="https://mozy.com/?ref=S4XE5A" target="_blank">referral</a> code and we both get an extra 256MB of storage.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/mozy-online-free-secure-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling MSN &amp; Live Messenger</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/disabling-msn-messenger/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/disabling-msn-messenger/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 14:00:26 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=147</guid>
		<description><![CDATA[There are quite a few guides on how to disable this viral little program. Sadly blocking it&#8217;s default port rarely works, because doing so causes the program to switch to port 80, which for most would mean blocking http traffic too. Several ways to do this on the internet involve editing the registry, this is [...]]]></description>
			<content:encoded><![CDATA[<p>There are quite a few guides on how to disable this viral little program. Sadly blocking it&#8217;s default port rarely works, because doing so causes the program to switch to port 80, which for most would mean blocking http traffic too.</p>
<p>Several ways to do this on the internet involve editing the registry, this is something that doesn&#8217;t appear to work any more.</p>
<p>The only way I&#8217;ve found that works is to edit the computers group policy (start &gt; run &gt; <strong>gpedit.msc</strong>). Under Administrative Templates and Windows components, you&#8217;ll find Windows Messenger. Simply set <em>&#8220;Do not allow windows messenger to be run&#8221;</em> to enabled.<br />
Thats it.</p>
<p><strong>Update:</strong> This doesn&#8217;t work for Live Messenger, one method I have found that uninstalls WLM completely is to run a command prompt (as administrator), and simply type: <em>msiexec /x {B1403D7D-C725-4858-AACC-7E5FA2D72859}.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/disabling-msn-messenger/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
