<?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>Spindicator</title>
	<atom:link href="http://www.spindicator.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spindicator.com</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 11:28:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Free tools that I like: Syncback</title>
		<link>http://www.spindicator.com/2012/05/free-tools-that-i-like-syncback/</link>
		<comments>http://www.spindicator.com/2012/05/free-tools-that-i-like-syncback/#comments</comments>
		<pubDate>Wed, 16 May 2012 11:28:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Freeware]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[encrypt]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[sync]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=282</guid>
		<description><![CDATA[<p>Sync and compare between directories Windows style. If you want to check out the command line version then check out my post here. There is support for local and FTP backup. If you go for the paid option then you get compression, encryption and a whole lot more. Check it out here&#8230; http://www.2brightsparks.com/welcome/backup/freeware.html</p>
 ]]></description>
			<content:encoded><![CDATA[<p>Sync and compare between directories Windows style. If you want to check out the command line version then check out my post <a href="http://www.spindicator.com/2012/05/file-sync-over-ssh/" title="http://www.spindicator.com/2012/05/file-sync-over-ssh/">here</a>. There is support for local and FTP backup. If you go for the paid option then you get compression, encryption and a whole lot more.</p>
<p>Check it out here&#8230;</p>
<p><a href="http://www.2brightsparks.com/welcome/backup/freeware.html" title="http://www.2brightsparks.com/welcome/backup/freeware.html" target="_blank">http://www.2brightsparks.com/welcome/backup/freeware.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/free-tools-that-i-like-syncback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free tools that I like: Virtual CloneDrive</title>
		<link>http://www.spindicator.com/2012/05/free-tools-that-i-like-virtual-clonedrive/</link>
		<comments>http://www.spindicator.com/2012/05/free-tools-that-i-like-virtual-clonedrive/#comments</comments>
		<pubDate>Tue, 15 May 2012 18:28:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Freeware]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[drive]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[physical]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=283</guid>
		<description><![CDATA[<p>If you need to make an image look like a physical drive on Windows I can think of no better way. For free its a gift. Quite light on resource also. Check it out here&#8230; http://www.slysoft.com/en/virtual-clonedrive.html</p>
 ]]></description>
			<content:encoded><![CDATA[<p>If you need to make an image look like a physical drive on Windows I can think of no better way. For free its a gift. Quite light on resource also.</p>
<p>Check it out here&#8230;</p>
<p><a href="http://www.slysoft.com/en/virtual-clonedrive.html" title="http://www.slysoft.com/en/virtual-clonedrive.html" target="_blank">http://www.slysoft.com/en/virtual-clonedrive.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/free-tools-that-i-like-virtual-clonedrive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free tools that I like: FastStone Image Viewer</title>
		<link>http://www.spindicator.com/2012/05/free-tools-that-i-like-faststone-image-viewer/</link>
		<comments>http://www.spindicator.com/2012/05/free-tools-that-i-like-faststone-image-viewer/#comments</comments>
		<pubDate>Mon, 14 May 2012 10:50:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Freeware]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[digital]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[raf]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=284</guid>
		<description><![CDATA[<p>This is an excellent, stable and fast image viewer with very good digital camera support and powerful batch processing capability. I had a ton of RAF files to convert once and this did a great job of it. I think the only thing that could make FastStone more useful would be a right click upload [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>This is an excellent, stable and fast image viewer with very good digital camera support and powerful batch processing capability. I had a ton of RAF files to convert once and this did a great job of it. I think the only thing that could make FastStone more useful would be a right click upload to Flickr. Hint! hint!</p>
<p>Check it out here&#8230;</p>
<p><a href="http://www.faststone.org/FSViewerDetail.htm" title="http://www.faststone.org/FSViewerDetail.htm" target="_blank">http://www.faststone.org/FSViewerDetail.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/free-tools-that-i-like-faststone-image-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File sync over SSH</title>
		<link>http://www.spindicator.com/2012/05/file-sync-over-ssh/</link>
		<comments>http://www.spindicator.com/2012/05/file-sync-over-ssh/#comments</comments>
		<pubDate>Fri, 11 May 2012 12:21:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshpass]]></category>
		<category><![CDATA[sync]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=276</guid>
		<description><![CDATA[<p>Having recently left one company for another I, like anyone else had a lot of stuff to backup from my laptop and place somewhere before I handed it back. Problem was that a lot of the information which I wanted to backup was changing. Quite infrequently but changing nonetheless. So, I needed a nice easy [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>Having recently left one company for another I, like anyone else had a lot of stuff to backup from my laptop and place somewhere before I handed it back. Problem was that a lot of the information which I wanted to backup was changing. Quite infrequently but changing nonetheless. So, I needed a nice easy way to sync and transport it to my hosting account. Enter Rsync and SSH. Combined they are the answer to a lot of peoples prayers. I also used sshpass in this instance since my hosting account is chrooted and unable to login with a key. I would recommend using authorized_keys if you have the option.</p>
<p>Since my old work machine is a Windows machine I actually used Cygwin for it&#8217;s ssh, sshpass (note: you will have to compile this one yourself since there is no port) and rsync. It worked pretty well.</p>
<h2>Rsync Command</h2>
<p>So here is the rsync command that I ended up with. I&#8217;ve left the long command line switches in here for clarity&#8230;</p>
<p></p><pre class="crayon-plain-tag">rsync --verbose  --progress --stats --compress --recursive --delete --times --perms --links --rsh='sshpass -p PASSWORD ssh -l USERNAME' /local/dir/ ssh.remote.com:/remote/dir/</pre><p></p>
<p>So, lets explain those options&#8230;</p><pre class="crayon-plain-tag">PASSWORD     : Swap out for your ssh password on the remote host
USERNAME     : Swap out for your ssh username on the remote host
/local/dir/  : Change to appropriate local directory
/remote/dir/ : Change to appropriate remote directory

--verbose    : Give us lots of information
--progress   : And some information on the progress during transfer (useful on large files)
--stats      : And some stats since I am a stats junkie
--compress   : Compress the file data during the transfer
--recursive  : Recurse into all of the directories and process them also
--delete     : Delete files from the destination dir that do not exist amymore
--times      : Preserve the modification times for the file when placing it on the remote server
--perms      : Preserve the permissions for the file when placing it on the remote server
--links      : Copy the symlinks as symlinks and do not resolve them</pre><p></p>
<p>I kicked this off overnight first time and then occasionally during the last week I worked. Once on the last day and then I formatted my machine. If I were running a *nix machine I would just have added it to the cron. Jobs a good &#8216;un.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/file-sync-over-ssh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JSON vs XML, some metrics</title>
		<link>http://www.spindicator.com/2012/05/json-vs-xml-some-metrics/</link>
		<comments>http://www.spindicator.com/2012/05/json-vs-xml-some-metrics/#comments</comments>
		<pubDate>Fri, 04 May 2012 10:27:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=130</guid>
		<description><![CDATA[<p>This is a super simple example of why JSON is taking over from XML when it comes to getting information both to and from a web service&#8230; Code We want to mock something of medium size (for a web service response) and so we use the following code&#8230; Output For my purposes here I am [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>This is a <strong>super</strong> simple example of why JSON is taking over from XML when it comes to getting information both to and from a web service&#8230;</p>
<h2>Code</h2>
<p>We want to mock something of medium size (for a web service response) and so we use the following code&#8230;</p>
<p></p><pre class="crayon-plain-tag">&lt;?php

for($i = 0; $i &lt; 1000; $i++) {
    $data[count($data)] = array(&quot;title&quot; =&gt; &quot;some title $i&quot;, &quot;author&quot; =&gt; &quot;author number $i&quot;, &quot;section&quot; =&gt; &quot;filed under section $i&quot;);
}

?&gt;</pre><p></p>
<h2>Output</h2>
<p>For my purposes here I am going to output in XML and also in JSON&#8230;</p>
<p></p><pre class="crayon-plain-tag">// JSON output
header('Content-type: application/json');
echo json_encode($data);

...

// XML output
header('Content-type: text/xml');
echo &quot;&lt;data&gt;&quot;;
foreach($data as $item) {
    echo &quot;&lt;item&gt;&quot;;
        echo &quot;&lt;title&gt;{$item[&quot;title&quot;]}&lt;/title&gt;&quot;;
        echo &quot;&lt;author&gt;{$item[&quot;author&quot;]}&lt;/author&gt;&quot;;
        echo &quot;&lt;section&gt;{$item[&quot;section&quot;]}&lt;/section&gt;&quot;;
    echo &quot;&lt;/item&gt;&quot;;
}
echo &quot;&lt;/data&gt;&quot;;</pre><p></p>
<h2>Metrics</h2>
<p>So bear in mind that all of this calling is from my local machine without anything unusual running and nothing scheduled to kick off in the middle of the capture. I guess this would be the best case scenario since it will essentially cut out any network related anomalies. For most load and stress testing I use NeoLoad from these guys&#8230;</p>
<p><a href="http://www.neotys.com/" title="http://www.neotys.com/" target="_blank">http://www.neotys.com/</a></p>
<p>It seems to do the job just nicely. I highly recommend you download the 30 day trial and check it out. So, lets get testing and see what we can figure out (though I am sure that you are guessing the result already).</p>
<h2>The Test</h2>
<p>Very simple, get the page from the server 1000 times (roughly an hour&#8217;s worth of an occasional service) with 10 concurrent users. We can see how long it takes and also how much data is transferred.</p>
<h2>Results</h2>
<h3>XML</h3>
<p></p><pre class="crayon-plain-tag">Time  : 5:02 
Size  : 112.57 MB</pre><p></p>
<h3>JSON</h3>
<p></p><pre class="crayon-plain-tag">Time  : 5:01 
Size  : 87.67 MB</pre><p></p>
<h2>Projecting Forward</h2>
<p>Does that seem like a lot or a little to you? Since the time is pretty much the same (might be more of a difference with a real host) lets have a look and see what you might save in terms of bandwidth course of a month&#8230;</p>
<p></p><pre class="crayon-plain-tag">XML   : 112.57 MB * 24 hours * 30 days = 81050.4 MB
JSON  : 87.67 MB  * 24 hours * 30 days = 63122.4 MB</pre><p></p>
<p>So, about 3/4 of the bandwidth cost for writing less code. Sounds like a good deal to me! Check out the code below and have a play around yourselves.</p>
<p><a href='http://www.spindicator.com/wp-content/uploads/2012/05/json-vs-xml.zip'>Download: JSON vs XML, some metrics</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/json-vs-xml-some-metrics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get the physical location of an IP address with the free GeoIP / GeoLite library</title>
		<link>http://www.spindicator.com/2012/05/getting-the-physical-location-from-the-free-geoip-geolite-library/</link>
		<comments>http://www.spindicator.com/2012/05/getting-the-physical-location-from-the-free-geoip-geolite-library/#comments</comments>
		<pubDate>Thu, 03 May 2012 10:49:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Location]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[geoip]]></category>
		<category><![CDATA[geolite]]></category>
		<category><![CDATA[localisation]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=233</guid>
		<description><![CDATA[<p>Why There are many reasons for finding out where the user is located physically on this planet of ours but I guess there are two main reasons&#8230; You want to track the user somehow in realtime and gain some knowledge based on this. You have regionalised your site and want to redirect the user to [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<h2>Why</h2>
<p>There are many reasons for finding out where the user is located physically on this planet of ours but I guess there are two main reasons&#8230;</p>
<ul>
<li>You want to track the user somehow in realtime and gain some knowledge based on this.</li>
<li>You have regionalised your site and want to redirect the user to the most appropriate area to maximise their experience. This can be as simple as a currency change to a totally different site.</li>
</ul>
<h2>Download</h2>
<p>First thing to do is to get the files from MaxMind. The free ones can be found here&#8230;</p>
<p><a href="http://www.maxmind.com/app/geolitecity" title="http://www.maxmind.com/app/geolitecity" target="_blank">http://www.maxmind.com/app/geolitecity</a></p>
<p>Bear in mind that the free version is slightly less accurate than the paid for version. It&#8217;s such a valuable resource though that I would say go for the paid version if you are going to use this in any commercial way.</p>
<h2>Decompress</h2>
<p>If you are on a Linux machine then the .gz is going to be familiar to you and you can just run a &#8216;gzip -d <filename>&#8216; on it. If your cruel company is forcing you to use a Windows machine that has no inbuilt support for one of the most widely used compression formats in the world today then your next stop is going to be downloading and installing 7-Zip&#8230;</p>
<p><a href="http://www.7-zip.org/" title="http://www.7-zip.org/" target="_blank">http://www.7-zip.org/</a></p>
<p>This is an excellent little archive utility and I have already <a href="http://www.spindicator.com/2012/05/free-tools-that-i-like-7-zip/" title="http://www.spindicator.com/2012/05/free-tools-that-i-like-7-zip/" target="_blank">written about it here</a>.</p>
<h2>Download the API code for PHP</h2>
<p>For our purposes here I am just going to use the Pure PHP API though if you have complete control of the machine I would recommend you check out the other options also. The Pure PHP API can be downloaded here&#8230;</p>
<p><a href="http://www.maxmind.com/app/php" title="http://www.maxmind.com/app/php" target="_blank">http://www.maxmind.com/app/php</a> </p>
<h2>First steps</h2>
<p>Decompress the API code and search for the geoip.inc, geoipcity.inc and the geoipregionvars.inc files. They will be in the root folder with all of the samples. Copy them into the same folder as the GeoLiteCity.dat file which should already be decomparessed.</p>
<h2>Code</h2>
<p>MaxMind have made this a real no brainer with with the API code that they provide&#8230;</p>
<p></p><pre class="crayon-plain-tag">&lt;?php

include 'geoipcity.inc';
include 'geoipregionvars.php';

$gi = geoip_open(&quot;GeoLiteCity.dat&quot;,GEOIP_STANDARD);

$info = geoip_record_by_addr($gi,&quot;130.167.0.0&quot;);

print_r($info);

geoip_close($gi);

?&gt;</pre><p></p>
<h2>What&#8217;s the incoming client IP address to a website?</h2>
<p>You will note from the above that I have just statically set the IP address to be 130.167.0.0 (a famous IP address range). This code really becomes useful when you place it on your site. So how are we going to get the IP address for the visiting user? Easy, PHP already has it in the $_SERVER['REMOTE_ADDR'] superglobal. Substitute that in for the static IP address and play around a bit. It can be interesting to see this information happening in (near) real time.</p>
<p>You might want to redirect to somewhere now based on the country / city&#8230;</p>
<p></p><pre class="crayon-plain-tag">header(&quot;Location: http://www.redirect.com/&quot;);

...or...

echo &quot;&lt;script&gt;location.href='http://www.redirect.com'&lt;/script&gt;&quot;; // If you have already made output</pre><p></p>
<p><a href='http://www.spindicator.com/wp-content/uploads/2012/05/geoipcity.zip'>Download: Get the physical location of an IP address with the free GeoIP / GeoLite library</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/getting-the-physical-location-from-the-free-geoip-geolite-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free tools that I like: 7-Zip</title>
		<link>http://www.spindicator.com/2012/05/free-tools-that-i-like-7-zip/</link>
		<comments>http://www.spindicator.com/2012/05/free-tools-that-i-like-7-zip/#comments</comments>
		<pubDate>Thu, 03 May 2012 10:18:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=236</guid>
		<description><![CDATA[<p>If you are on a Windows machine and dealing with Linux machines for hosting then you are going to need a decent compression tool. Over the years I have settled on 7-Zip and it is one of the first things that goes on any Windows machine that I am forced to use&#8230; http://www.7-zip.org/ I rarely [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>If you are on a Windows machine and dealing with Linux machines for hosting then you are going to need a decent compression tool. Over the years I have settled on 7-Zip and it is one of the first things that goes on any Windows machine that I am forced to use&#8230;</p>
<p><a href="http://www.7-zip.org/" title="http://www.7-zip.org/">http://www.7-zip.org/</a></p>
<p>I rarely even open it and just use the right click Explorer extensions. The 7z compression format comes highly recommended also for archive since it used LZMA / LZMA2 and can help you make the most of your backup space.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/free-tools-that-i-like-7-zip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ignore SVN files from .htaccess</title>
		<link>http://www.spindicator.com/2012/05/ignore-svn-files-from-htaccess/</link>
		<comments>http://www.spindicator.com/2012/05/ignore-svn-files-from-htaccess/#comments</comments>
		<pubDate>Thu, 03 May 2012 08:56:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[codebase]]></category>
		<category><![CDATA[ignore]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=23</guid>
		<description><![CDATA[<p>If you for some reason have a directory tree on a server and include .svn directories in there anyone browsing to that directory will get one of two things. Information they should not be seeing or a 403 Forbidden which tells them that those files exist on the server. That could lead to other things [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>If you for some reason have a directory tree on a server and include .svn directories in there anyone browsing to that directory will get one of two things. Information they should not be seeing or a 403 Forbidden which tells them that those files exist on the server. That could lead to other things and eventually information you do not want shared could be exposed. You really want to send out a 404 Not Found to stop anyone curious at the gate. Add the following to the .htaccess file&#8230;</p>
<p></p><pre class="crayon-plain-tag"># Give a 404 when any of the .svn directories are accessed
RedirectMatch 404 &quot;/.svn&quot;

# If they are going to show the directory listing in the browser then filter out all of the .svn folders
&lt;IfModule autoindex_module&gt;
    IndexIgnore .svn
&lt;/IfModule&gt;</pre><p></p>
<p>&#8230;and for a bonus while you are at it I would also deny them from browsing the wp-config.php file&#8230;</p>
<p></p><pre class="crayon-plain-tag"># Deny browse to the wp-config.php file
RedirectMatch 404 &quot;/wp-config.php&quot;</pre><p></p>
<p>You are now a little bit more secure <img src='http://www.spindicator.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/05/ignore-svn-files-from-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free tools that I like: VirtuaWin for Windows 7</title>
		<link>http://www.spindicator.com/2012/04/free-tools-that-i-like-virtuawin-for-windows-7/</link>
		<comments>http://www.spindicator.com/2012/04/free-tools-that-i-like-virtuawin-for-windows-7/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 12:26:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Freeware]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[desktops]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=216</guid>
		<description><![CDATA[<p>If you are used to using a Mac or a Linux box (as I am) then you are going to take virtual desktops (or Spaces for the Mac crowd) for granted. Sadly Windows doesn&#8217;t have this built in BUT it is easy to get. I would venture that this implementation of virtual windows for a [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>If you are used to using a Mac or a Linux box (as I am) then you are going to take virtual desktops (or Spaces for the Mac crowd) for granted. Sadly Windows doesn&#8217;t have this built in BUT it is easy to get. I would venture that this implementation of virtual windows for a desktop is far better than Spaces anyway with all of the configuration options you could possibly want. Switching is fast and I have never had a problem with it.</p>
<p>Enjoy&#8230;</p>
<p><a href="http://virtuawin.sourceforge.net/" title="http://virtuawin.sourceforge.net/" target="_blank">http://virtuawin.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/free-tools-that-i-like-virtuawin-for-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting page stats from Google Analytics and caching them in Memcache</title>
		<link>http://www.spindicator.com/2012/04/getting-page-stats-from-google-analytics-and-caching-them-in-memcache/</link>
		<comments>http://www.spindicator.com/2012/04/getting-page-stats-from-google-analytics-and-caching-them-in-memcache/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 11:00:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[hits]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=209</guid>
		<description><![CDATA[<p>A recent request came in to have a pageview displayed per blog post in WordPress. Sounds simple enough and there are numerous solutions out there already. I have even rolled my own in the past with success. Since the site was using the indispensable Google Analytics I thought that the ultimate solution would involve just [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>A recent request came in to have a pageview displayed per blog post in WordPress. Sounds simple enough and there are numerous solutions out there already. I have even rolled my own in the past with success. Since the site was using the indispensable <a href="http://www.google.com/analytics/" title="http://www.google.com/analytics/" target="_blank">Google Analytics</a> I thought that the ultimate solution would involve just grabbing the value from them. There is a slight complication in that for every page hit you should not call the API for non essential data. I mean who cares if the pageviews number is 10 minutes old if you save a second or more on the page load if there are many calls. Plus, it will give me a great opportunity to mention <a href="http://memcached.org/" title="http://memcached.org/" target="_blank">Memcached</a>. You can see from their homepage that they you will be in excellent company using this tool. Frankly, if you haven&#8217;t heard of it yet you should get out of your cave a little more often.</p>
<h2>Step 1</h2>
<p>First thing you are going to have to have a quick scan of are the Google Analytics reporting dimensions&#8230;</p>
<p><a href="https://developers.google.com/analytics/devguides/reporting/core/dimsmets" title="https://developers.google.com/analytics/devguides/reporting/core/dimsmets" target="_blank">https://developers.google.com/analytics/devguides/reporting/core/dimsmets</a></p>
<p>This is a listing of the ways you can slice the data that Google Analytics captures on each page hit. It&#8217;s important to note that not all combinations are valid though there are so many that are you&#8217;re not going to be stuck for some metrics data! </p>
<h2>Step 2</h2>
<p>Next on the list is to go and grab a copy of the <a href="http://code.google.com/p/gapi-google-analytics-php-interface/" title="http://code.google.com/p/gapi-google-analytics-php-interface/" target="_blank">Google Analytics PHP Interface</a>. </p>
<h2>Step 3</h2>
<p>I am going to assume for this step that you have an account already with Google Analytics and that you are monitoring something. You need to get the profileId for the specific domain. Fortunately this is pretty easy within the code&#8230;</p>
<p></p><pre class="crayon-plain-tag">&lt;?php

require 'config/ga_define.php';
require 'api/gapi.class.php';

$ga = new gapi(ga_email,ga_password);

$ga-&gt;requestAccountData();
print_r($ga);

?&gt;</pre><p></p>
<p>View source if it looks like a muddled mess. Make sure you change the values in ga_define.php first (check for the download at the end of the post). This just gives you a dump of all the accounts (plus some more information) and their associated data. Pick the profileId for the domain you want to check the page from.</p>
<h2>Step 4</h2>
<p>So now that we have the profileId we can query Google Analytics for the page that is under that profile&#8230;</p>
<p></p><pre class="crayon-plain-tag">&lt;?php

require 'config/ga_define.php';
require 'api/gapi.class.php';

$ga = new gapi(ga_email,ga_password);

$filter = 'pagePath == /2012/04/combination-rss-feed-for-wordpress-multisite/';

$ga-&gt;requestReportData(ga_profile_id,array('pagePath'),array('pageviews','visits'),null,$filter);
print_r($ga-&gt;getMetrics());

?&gt;</pre><p></p>
<p>Have some coffee. You deserve it. Actually hold on, you don&#8217;t really since letting this code run wild on any server that doesn&#8217;t need absolutely up to the minute pageview data (and 99% wont) is bad practice. It should be cached somewhere. This is where Memcached comes in.</p>
<h2>Step 5</h2>
<p>Installing Memcached is beyond the scope of this post but suffice to say you should be up and running in minutes. Please refer to the documentation&#8230;</p>
<p><a href="http://code.google.com/p/memcached/wiki/NewStart" title="http://code.google.com/p/memcached/wiki/NewStart" target="_blank">http://code.google.com/p/memcached/wiki/NewStart</a></p>
<p>It will involve including a new PHP extension in the php.ini file and bouncing Apache.</p>
<h2>Step 6</h2>
<p>Wrap your call to Google Analytics in a Memcache object&#8230;</p>
<p></p><pre class="crayon-plain-tag">&lt;?php

require 'config/ga_define.php';
require 'api/gapi.class.php';

$memcache = new Memcache;
$memcache-&gt;connect('localhost', 11211);

function get_key($key) {
    global $memcache;

    return ($memcache) ? $memcache-&gt;get($key) : false;
}

function set_key($key, $object, $timeout = 3600) {
    global $memcache;

    return ($memcache) ? $memcache-&gt;set($key, $object, 0, $timeout) : false;
}

$ga = new gapi(ga_email,ga_password);

$page_path = '/2012/04/combination-rss-feed-for-wordpress-multisite/';
$filter = 'pagePath == '.$page_path;

$cache_verison = get_key(md5($page_path));
if ($cache_version)
    print_r($cache_version);
else {
    $ga-&gt;requestReportData(ga_profile_id,array('pagePath'),array('pageviews','visits'),null,$filter);
    print_r($ga-&gt;getMetrics());

    set_key(md5($page_path), $ga-&gt;getMetrics());
}

?&gt;</pre><p></p>
<p>Done! Now you can have that cup of coffee. All code can be downloaded here&#8230;</p>
<p><a href='http://www.spindicator.com/wp-content/uploads/2012/04/gapi-example.zip'>Download: Google Analytics API example with Memcached</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/getting-page-stats-from-google-analytics-and-caching-them-in-memcache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL dump script with WordPress test database refresh</title>
		<link>http://www.spindicator.com/2012/04/sql-dump-script-with-wordpress-test-database-refresh/</link>
		<comments>http://www.spindicator.com/2012/04/sql-dump-script-with-wordpress-test-database-refresh/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 12:14:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[refresh]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=194</guid>
		<description><![CDATA[<p>One of the tasks that I find myself doing again and again is taking a database from the production installation http://www.something.com and replicating it to the test installation for a better test environment. As you know when shifting from one domain to another with WordPress you have to do a search and replace on the [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>One of the tasks that I find myself doing again and again is taking a database from the production installation http://www.something.com and replicating it to the test installation for a better test environment. As you know when shifting from one domain to another with WordPress you have to do a search and replace on the SQL data since it references the host URL quite often. Tired of tweaking the SQL dump with (the excellent) <a href="http://www.vim.org/" title="http://www.vim.org/" target="_blank">Vim</a> I decided to write a simple shell script to do the dump and also the tweak and load. Why don&#8217;t I just use export / import? Well, I like to cron this as a nightly task.</p>
<p>This is the content of the config.sh</p>
<p></p><pre class="crayon-plain-tag">#!/bin/bash

PROD_USERNAME=produser
PROD_PASSWORD=prodpass
PROD_DBNAME=proddb
PROD_URL=www.something.com

TEST_USERNAME=testsuer
TEST_PASSWORD=testpass
TEST_DBNAME=testdb
TEST_URL=test.something.com

OUTPUT_DIR=/home/user/sql</pre><p></p>
<p>This is the content of the dump.sh</p>
<p></p><pre class="crayon-plain-tag">#!/bin/bash

if [ -z $OUTPUT_DIR ]; then
    source ./config.sh
fi

OUTPUT_FILENAME=$OUTPUT_DIR/&lt;code&gt;date +'%Y%m'&lt;/code&gt;/&lt;code&gt;date +'%Y%m%d'&lt;/code&gt;_blogs_db.sql

# Make sure that the directory is in place before we make the output
mkdir $OUTPUT_DIR/&lt;code&gt;date +'%Y%m'&lt;/code&gt; 1&gt;/dev/null 2&gt;&amp;1

# Dump the database
echo Dumping $PROD_DBNAME to $OUTPUT_FILENAME.gz ...
mysqldump -c --skip-extended-insert -u $PROD_USERNAME -p$PROD_PASSWORD $PROD_DBNAME &gt; $OUTPUT_FILENAME
gzip -9 $OUTPUT_FILENAME</pre><p></p>
<p>This is the content of the refresh_test.sh</p>
<p></p><pre class="crayon-plain-tag">#!/bin/bash

source ./config.sh

OUTPUT_FILENAME=$OUTPUT_DIR/&lt;code&gt;date +'%Y%m'&lt;/code&gt;/&lt;code&gt;date +'%Y%m%d'&lt;/code&gt;_blogs-test_db.sql
OUTPUT_FILENAME_BACKUP=$OUTPUT_DIR/&lt;code&gt;date +'%Y%m'&lt;/code&gt;/&lt;code&gt;date +'%Y%m%d'&lt;/code&gt;_blogs-test_backup_db.sql

# Make sure that the directory is in place before we make the output
mkdir $OUTPUT_DIR/&lt;code&gt;date +'%Y%m'&lt;/code&gt; 1&gt;/dev/null 2&gt;&amp;1

# Dump the file changing the url through the pipe
echo Dumping and converting $PROD_DBNAME to $OUTPUT_FILENAME ...
mysqldump -c --skip-extended-insert -u $PROD_USERNAME -p$PROD_PASSWORD $PROD_DBNAME | sed -e &quot;s/$PROD_URL/$TEST_URL/g&quot; &gt; $OUTPUT_FILENAME

# Create a backup of the test database which you are going to nuke in the next paragraph
echo Backing up $TEST_DBNAME to $OUTPUT_FILENAME_BACKUP ...
mysqldump -c --skip-extended-insert -u $TEST_USERNAME -p$TEST_PASSWORD $TEST_DBNAME &gt; $OUTPUT_FILENAME_BACKUP

# Wipe the contents of the test with the new changed prod
echo Reading and overwriting $TEST_DBNAME with $OUTPUT_FILENAME ...
mysql -u $TEST_USERNAME -p$TEST_PASSWORD $TEST_DBNAME &lt; $OUTPUT_FILENAME</pre><p></p>
<p>So, now I just cron a dump.sh nightly (using rsync later to shift it off to another machine) and also cron a refresh_test.sh nightly so that I am always testing with some fresh data. Perfect!</p>
<p><a href='http://www.spindicator.com/wp-content/uploads/2012/04/dump-and-refresh.zip'>Download: WordPress database dump and refresh scripts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/sql-dump-script-with-wordpress-test-database-refresh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using multiple databases with a single WordPress codebase</title>
		<link>http://www.spindicator.com/2012/04/using-multiple-databases-with-a-single-wordpress-codebase/</link>
		<comments>http://www.spindicator.com/2012/04/using-multiple-databases-with-a-single-wordpress-codebase/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 11:50:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=21</guid>
		<description><![CDATA[<p>This is a super simple trick that can be easily included in the default wp-config.php file to keep things simple when working with the codebase on a local install. And further down the file if using WordPress multisite&#8230;</p>
 ]]></description>
			<content:encoded><![CDATA[<p>This is a super simple trick that can be easily included in the default wp-config.php file to keep things simple when working with the codebase on a local install.</p>
<p></p><pre class="crayon-plain-tag">if ($_SERVER['DOCUMENT_ROOT'] == 'C:/xampp/htdocs/MyBlogDirectory') { // Localhost development
    define('DB_NAME', 'my-blog-local');
    define('DB_USER', 'user');
    define('DB_PASSWORD', 'pass');
}
else { // Production
    define('DB_NAME', 'my-blog-local');
    define('DB_USER', 'user');
    define('DB_PASSWORD', 'pass');
}</pre><p></p>
<p>And further down the file if using WordPress multisite&#8230;</p>
<p></p><pre class="crayon-plain-tag">if ($_SERVER['DOCUMENT_ROOT'] == 'C:/xampp/htdocs/MyBlogDirectory') { // Localhost development
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'my-blog-local-url'); // Whatever this is it must be resolvable, more than likely you have something in your hosts file
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
}
else {  // Production
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'my.blog.com'); // This will be the url for the production site
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
}</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/using-multiple-databases-with-a-single-wordpress-codebase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combination RSS feed for WordPress multisite</title>
		<link>http://www.spindicator.com/2012/04/combination-rss-feed-for-wordpress-multisite/</link>
		<comments>http://www.spindicator.com/2012/04/combination-rss-feed-for-wordpress-multisite/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 11:36:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[combine]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=178</guid>
		<description><![CDATA[<p>Having recently had the request for a combination feed containing all of the sites in a WordPress multisite install I went on the hunt for a nice simple plugin. It had to exist right? Well, not in the way that I wanted it to. Solutions seemed overly complex. I didn&#8217;t have much time so I [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>Having recently had the request for a combination feed containing all of the sites in a WordPress multisite install I went on the hunt for a nice simple plugin. It had to exist right? Well, not in the way that I wanted it to. Solutions seemed overly complex. I didn&#8217;t have much time so I just rolled my own in about 30 minutes. If anyone out there wants to make this into a plugin please feel free. The only thing I ask is that you drop me the link so that I can reference it here.</p>
<p>There are two things to note about my solution. </p>
<ul>
<li>It uses the excellent <a href="http://www.simplepie.org/" title="http://www.simplepie.org/" target="_blank">SimplePie</a> library</li>
<li>It also is aware of the <a href="http://wordpress.org/extend/plugins/jf3-maintenance-mode/" title="http://wordpress.org/extend/plugins/jf3-maintenance-mode/" target="_blank">JF3 Maintenance Redirect</a> status for the site. An excellent plugin. I check the site is not in maintenance mode in line 43 of index.php</li>
</ul>
<p>Be sure to update the heading information for the RSS file (starting from line 57 of index.php) before putting this into production. Just drop it into your root folder and then you should be able to see all feeds via http://www.your-url-here.com/feed-combine/</p>
<p><a href='http://www.spindicator.com/wp-content/uploads/2012/04/feed-combine.zip'>Download: WordPress multisite feed combination script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/combination-rss-feed-for-wordpress-multisite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compare two directories in Linux / Mac OS X</title>
		<link>http://www.spindicator.com/2012/04/compare-two-directories-in-linux-mac-os-x/</link>
		<comments>http://www.spindicator.com/2012/04/compare-two-directories-in-linux-mac-os-x/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 10:48:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=123</guid>
		<description><![CDATA[<p>An excellent way to make a quick recursive comparison of two directories is with the diff command&#8230; It will give you some kind of output like the following&#8230; To resolve the differences check out rsync for one way sync. Be sure to test out any command with the -n flag. This does a &#8220;dry run&#8221; [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>An excellent way to make a quick recursive comparison of two directories is with the diff command&#8230;</p>
<p></p><pre class="crayon-plain-tag">diff -rq dirA dirB</pre><p></p>
<p>It will give you some kind of output like the following&#8230;</p>
<p></p><pre class="crayon-plain-tag">[X]$ diff -rq dirA dirB
Files dirA/differs.txt and dirB/differs.txt differ
Only in dirA: only_in_a.txt
Only in dirB: only_in_b.txt
[X]$</pre><p></p>
<p>To resolve the differences check out rsync for one way sync. Be sure to test out any command with the -n flag. This does a &#8220;dry run&#8221; of rsync showing possible changes without actually making them. </p>
<p><a href="http://en.wikipedia.org/wiki/Rsync" title="http://en.wikipedia.org/wiki/Rsync" target="_blank">http://en.wikipedia.org/wiki/Rsync</a></p>
<p>For two way sync try unison.</p>
<p><a href="http://en.wikipedia.org/wiki/Unison_(file_synchronizer)" title="http://en.wikipedia.org/wiki/Unison_(file_synchronizer)" target="_blank">http://en.wikipedia.org/wiki/Unison_(file_synchronizer)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/compare-two-directories-in-linux-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get log4net working in a four simple steps</title>
		<link>http://www.spindicator.com/2012/04/get-log4net-working-in-a-four-simple-steps/</link>
		<comments>http://www.spindicator.com/2012/04/get-log4net-working-in-a-four-simple-steps/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 12:50:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[info]]></category>
		<category><![CDATA[log4net]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[warn]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=163</guid>
		<description><![CDATA[<p>Step 1 First of all, you need to download the log4net binaries&#8230; http://logging.apache.org/log4net/download.html &#8230;unpack and then include the log4net.dll file (found in the bin\net\[framework]\release). Do a test build. If you get an error complaining about System.Web then is it more than likely that you are using one of the client profile frameworks. Switch to one [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<h2>Step 1</h2>
<p>First of all, you need to download the log4net binaries&#8230;</p>
<p><a title="Download log4net from Apache" href="http://logging.apache.org/log4net/download.html" target="_blank">http://logging.apache.org/log4net/download.html</a></p>
<p>&#8230;unpack and then include the log4net.dll file (found in the bin\net\[framework]\release). Do a test build. If you get an error complaining about System.Web then is it more than likely that you are using one of the client profile frameworks. Switch to one of the complete frameworks.</p>
<h2>Step 2</h2>
<p>I prefer to have the configuration in the App.config file for my console apps (there are options to have it exist externally) and so we shall start with that&#8230;</p>
<p></p><pre class="crayon-plain-tag">&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;configuration&gt;
  &lt;configSections&gt;
    &lt;section name=&quot;log4net&quot; type=&quot;log4net.Config.Log4NetConfigurationSectionHandler, log4net&quot; /&gt;
  &lt;/configSections&gt;

  &lt;connectionStrings&gt;
    &lt;add name=&quot;DB&quot; providerName=&quot;System.Data.SqlClient&quot; connectionString=&quot;CONNECTION&quot;/&gt;
  &lt;/connectionStrings&gt;
  &lt;appSettings&gt;
    &lt;add key=&quot;KEY&quot; value=&quot;VALUE&quot;/&gt;
  &lt;/appSettings&gt;
  &lt;startup&gt;
    &lt;supportedRuntime version=&quot;v4.0&quot; sku=&quot;.NETFramework,Version=v4.0&quot;/&gt;
  &lt;/startup&gt;
  
  &lt;log4net debug=&quot;true&quot;&gt;
    &lt;appender name=&quot;ConsoleAppender&quot; type=&quot;log4net.Appender.ConsoleAppender&quot;&gt;
      &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
      &lt;/layout&gt;
    &lt;/appender&gt;
    &lt;appender name=&quot;RollingLogFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
      &lt;file value=&quot;C:\temp\Log.txt&quot; /&gt;
      &lt;appendToFile value=&quot;true&quot; /&gt;
      &lt;rollingStyle value=&quot;Size&quot; /&gt;
      &lt;maxSizeRollBackups value=&quot;10&quot; /&gt;
      &lt;maximumFileSize value=&quot;100MB&quot; /&gt;
      &lt;staticLogFileName value=&quot;true&quot; /&gt;
      &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
        &lt;conversionPattern value=&quot;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&quot; /&gt;
      &lt;/layout&gt;
    &lt;/appender&gt;
    &lt;root&gt;
      &lt;appender-ref ref=&quot;ConsoleAppender&quot; /&gt;
      &lt;appender-ref ref=&quot;RollingLogFileAppender&quot; /&gt;
    &lt;/root&gt;
  &lt;/log4net&gt;
&lt;/configuration&gt;</pre><p></p>
<p>For this example I have decided to include a Console log and also a RollingLogFile log, written to at the same time with the same information. My default setup.</p>
<h2>Step 3</h2>
<p>Add the namespace&#8230;</p>
<p></p><pre class="crayon-plain-tag">using log4net;</pre><p></p>
<p>In your code (usually just inside the class declaration for maximum scope) include the following&#8230;</p>
<p></p><pre class="crayon-plain-tag">private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);</pre><p></p>
<p>Then it is time to write something to the log&#8230;</p>
<p></p><pre class="crayon-plain-tag">if (log.IsDebugEnabled)
    log.Debug(&quot;TICK&quot;);

if (log.IsWarnEnabled)
    log.Warn(&quot;TOCK&quot;);

if (log.IsErrorEnabled)
    log.Error(&quot;POP&quot;);</pre><p></p>
<h2>Step 4</h2>
<p>Having scratched my head for a bit wondering why everything was not working at this stage (everything I could find said that it should) I then realised that this&#8230;</p>
<p></p><pre class="crayon-plain-tag">[assembly: log4net.Config.XmlConfigurator()]</pre><p></p>
<p>Should be added to the AssemblyInfo.cs file. Hey Presto! Everything working and logging nicely!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/get-log4net-working-in-a-four-simple-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sort files based on creation time or internal XML timestamp in C#</title>
		<link>http://www.spindicator.com/2012/04/sort-files-based-on-creation-time-or-internal-xml-timestamp-in-c/</link>
		<comments>http://www.spindicator.com/2012/04/sort-files-based-on-creation-time-or-internal-xml-timestamp-in-c/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 10:49:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=155</guid>
		<description><![CDATA[<p>It&#8217;s always good to know how to write a custom compare in C#. Extremely useful in some situations. I came across a perfect example a couple of days ago whilst having to process XML files sequentially in a folder based upon a timestamp in the XML itself. I&#8217;ve included a standard file compare for reference. [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always good to know how to write a custom compare in C#. Extremely useful in some situations. I came across a perfect example a couple of days ago whilst having to process XML files sequentially in a folder based upon a timestamp in the XML itself. I&#8217;ve included a standard file compare for reference.</p>
<p></p><pre class="crayon-plain-tag">public class SortFiles
{
    public class CompareFileByDate : IComparer
    {
        int IComparer.Compare(Object a, Object b)
        {
            FileInfo fia = new FileInfo((string)a);
            FileInfo fib = new FileInfo((string)b);

            DateTime cta = fia.CreationTime;
            DateTime ctb = fib.CreationTime;

            return DateTime.Compare(cta, ctb);
        }
    }

    public class CompareFileByTimestampInternal : IComparer
    {
        int IComparer.Compare(Object a, Object b)
        {
            XElement EventA = XDocument.Load((string)a).Root.Element(&quot;timestamp&quot;);
            DateTime cta = DateTime.Parse(EventA.Value);

            XElement EventB = XDocument.Load((string)b).Root.Element(&quot;timestamp&quot;);
            DateTime ctb = DateTime.Parse(EventB.Value);

            return DateTime.Compare(cta, ctb);
        }
    }
}</pre><p></p>
<p>Calling the code is no different than the usual methods&#8230;</p>
<p></p><pre class="crayon-plain-tag">string[] files = System.IO.Directory.GetFiles(Some.Path, &quot;*.xml&quot;);
IComparer fileComparer = new SortFiles.CompareFileByTimestampInternal();
Array.Sort(files, fileComparer);</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/04/sort-files-based-on-creation-time-or-internal-xml-timestamp-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Fiddler 2 to debug your WCF .NET service</title>
		<link>http://www.spindicator.com/2012/01/using-fiddler-2-to-debug-your-wcf-net-service/</link>
		<comments>http://www.spindicator.com/2012/01/using-fiddler-2-to-debug-your-wcf-net-service/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 13:47:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Analysis]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[fiddler]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=148</guid>
		<description><![CDATA[<p>A lot of the time I develop .NET services (or clients depending on services) and so far the best debugging tool that I know of is Fiddler (http://www.fiddler2.com/fiddler2/). Do yourself a favour and if you are debugging anything from jQuery asynchronous calls / tricky services / iPhone development / Windows Phone development or even if you want [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>A lot of the time I develop .NET services (or clients depending on services) and so far the best debugging tool that I know of is Fiddler (<a href="http://www.fiddler2.com/fiddler2/" target="_blank">http://www.fiddler2.com/fiddler2/</a>). Do yourself a favour and if you are debugging anything from jQuery asynchronous calls / tricky services / iPhone development / Windows Phone development or even if you want to see what your machine is really sending out to the network around then it&#8217;s going to be your saviour. So, now to a simple tip for those that are going to use it to try and figure out what is going on with the WCF service they are developing on their local machine. Here is how to pass all traffic from the service through the Fiddler debugging proxy.</p>
<p>All you need to do is alter your web.config&#8230;</p>
<p></p><pre class="crayon-plain-tag">&lt;configuration&gt;
  &lt;system.net&gt;
    &lt;defaultProxy&gt;
      &lt;proxy usesystemdefault=&quot;False&quot;
        bypassonlocal=&quot;True&quot; 
        proxyaddress=&quot;http://127.0.0.1:8888&quot; /&gt;
    &lt;/defaultProxy&gt;
  &lt;/system.net&gt;
&lt;/configuration&gt;</pre><p></p>
<p>&#8230;and now you will see everything pass through Fiddler. Click on the specific call and start your investigations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/01/using-fiddler-2-to-debug-your-wcf-net-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to monitor your site from the console</title>
		<link>http://www.spindicator.com/2012/01/how-to-monitor-your-site-from-the-console/</link>
		<comments>http://www.spindicator.com/2012/01/how-to-monitor-your-site-from-the-console/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 20:56:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[interfaces]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[realtime]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=119</guid>
		<description><![CDATA[<p>Quite often I find myself with nothing but a console as access into any new Unix / Linux machine. Granted they are bad for some things but you will quickly find out that they are still the quickest and easiest way to get certain information from a system. You might be surprised to find that [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>Quite often I find myself with nothing but a console as access into any new Unix / Linux machine. Granted they are bad for some things but you will quickly find out that they are still the quickest and easiest way to get certain information from a system. You might be surprised to find that there are a load of great network and site monitoring tools out there that will run nicely over the console, take up no space and work like a charm. So to kick off Let me introduce the first one&#8230;</p>
<h2>iftop</h2>
<p></p><pre class="crayon-plain-tag">yum install iftop</pre><p></p>
<p>As the name might suggest to you &#8216;top&#8217; but for interfaces (network interfaces). The simplest layout of them all &#8211; a monochrome readout telling you all of the hosts connected to the current interface (or another interface, use the -i option on the command line), how fast they are pulling information from the machine and the overall transmit and receive. Use this one if you have a site with some traffic and you want to see who are the biggest bandwidth hogs connected. This can be a useful one for debugging a site if it gets slow periodically (can be cron / load based or it can also be bot / hits based).</p>
<p><a href="http://www.spindicator.com/wp-content/uploads/2012/01/iftop_ports.png"><img class="alignnone size-medium wp-image-136" title="iftop_ports" src="http://www.spindicator.com/wp-content/uploads/2012/01/iftop_ports-300x183.png" alt="" width="300" height="183" /></a></p>
<p><a href="http://www.ex-parrot.com/pdw/iftop/">http://www.ex-parrot.com/pdw/iftop/</a></p>
<h2>iptraf</h2>
<p></p><pre class="crayon-plain-tag">yum install iptraf</pre><p></p>
<p>This one is a little more involved than iptop. A full blown network statistics utility. If you have been using tcpdump in the past then you might want to give this one a shot also. You can monitor (in glorious console colour) traffic to the machine, interface statistics, statistical breakdowns and more. Add to this a really nice filter (with IP as one of the options) and you are onto a winner. Use this one if you want to get some more detail or check out traffic from a specific IP.</p>
<p><a href="http://www.spindicator.com/wp-content/uploads/2012/01/iptraf-tcpudp.gif"><img class="alignnone size-medium wp-image-135" title="iptraf-tcpudp" src="http://www.spindicator.com/wp-content/uploads/2012/01/iptraf-tcpudp-300x188.gif" alt="" width="300" height="188" /></a></p>
<p><a href="http://iptraf.seul.org/">http://iptraf.seul.org/</a></p>
<h2>apachetop</h2>
<p></p><pre class="crayon-plain-tag">yum install apachetop</pre><p></p>
<p>Whilst Google Analytics and other packages have made collecting information about your sites visitors super simple it is nice sometime to check out the hits as you are getting them. This is particularly interesting and useful in the optimisation process for any site. You can see what&#8217;s being called and in near realtime since apachetop keeps a track of all your logfiles. Click on the &#8216;h&#8217; key whilst in there and you will get to see some interesting options such as how to get some detailed information about any of the requests. One of the most useful options is &#8216;n&#8217; to switch from the bytes statistic to the HTTP return code value. Great for seeing where those 2xx, 3xx, 4xx and 5xx requests are coming from. Use this one also to check out what&#8217;s hot in realtime on your site, what pages are transmitting most frequently and which assets might be worth optimising.</p>
<p><a href="http://www.spindicator.com/wp-content/uploads/2012/01/apachetop.png"><img class="alignnone size-medium wp-image-137" title="apachetop" src="http://www.spindicator.com/wp-content/uploads/2012/01/apachetop-300x150.png" alt="" width="300" height="150" /></a></p>
<p><a href="http://code.google.com/p/apachetop/">http://code.google.com/p/apachetop/</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/01/how-to-monitor-your-site-from-the-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online education, is this going to be the future?</title>
		<link>http://www.spindicator.com/2012/01/online-education-is-this-going-to-be-the-future/</link>
		<comments>http://www.spindicator.com/2012/01/online-education-is-this-going-to-be-the-future/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 11:11:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[elearning]]></category>
		<category><![CDATA[free]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=85</guid>
		<description><![CDATA[<p>I have to hand it to the guys and gals over there in the Massachusetts Institute of Technology (M.I.T.). There are looking to the future and trying to make it a better place. Fancy some free interactive education from M.I.T.? I do. A recent announcement is set to make this practical fantasy a reality. It also got [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>I have to hand it to the guys and gals over there in the <a title="M.I.T." href="http://web.mit.edu/" target="_blank">Massachusetts Institute of Technology</a> (M.I.T.). There are looking to the future and trying to make it a better place. Fancy some free interactive education from M.I.T.? I do. A recent announcement is set to make this practical fantasy a reality. It also got me thinking&#8230; is this to be the future of education? This is their second try at online courses. Apple has iTunes U and numerous others exist. I guess to answer that you have to answer the leading question &#8211; is it worth anything at all? Well, they are declaring the courses as a kind of certification rather than equivalent to a degree. Given that the price of a degree is quite out of reach of many these days (and getting further away) is this a way to break into the market if you have a laptop and ton of determination? I think so. Anyone gaining one of these qualifications would certainly have drive in abundance, a curious intellect and be a hard worker.  They may (and most likely would be) doing this whilst holding down a job or raising a family at the same time. So, some respect due to anyone in this situation for putting in the hard work. They may also be the perfect supplement to an existing degree to try and further your career prospects or last but not least just for fun.</p>
<p>Personally, there are many things that I have had exposure to in university and also along my career path which would be fascinating to delve a bit deeper into. Neural networks / AI have always been one of these subjects for me. I for one can&#8217;t wait to see what they will offer!</p>
<p>Check out this link to Forbes for further detail&#8230;</p>
<p><a title="MIT Game Changer" href="http://www.forbes.com/sites/jamesmarshallcrotty/2011/12/21/m-i-t-game-changer-free-online-education-for-all/" target="_blank">M.I.T. Game Changer</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2012/01/online-education-is-this-going-to-be-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching high and low for a WordPress multisite maintenance mode that actually works</title>
		<link>http://www.spindicator.com/2011/12/searching-high-and-low-for-a-wordpress-multisite-maintenance-mode-that-actually-works/</link>
		<comments>http://www.spindicator.com/2011/12/searching-high-and-low-for-a-wordpress-multisite-maintenance-mode-that-actually-works/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 11:58:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=33</guid>
		<description><![CDATA[<p>So, after a quite frustrating search, plugin install, test, sigh loop I eventually found a winner and the purpose of this post is to try and save someone the hassle of doing the same. If you are looking for a plugin that works with WordPress multisite and that can bring a site in and out [...]</p>
 ]]></description>
			<content:encoded><![CDATA[<p>So, after a quite frustrating search, plugin install, test, sigh loop I eventually found a winner and the purpose of this post is to try and save someone the hassle of doing the same. If you are looking for a plugin that works with WordPress multisite and that can bring a site in and out of maintenance mode individually you can&#8217;t go wrong with&#8230;</p>
<p><a href="http://wordpress.org/extend/plugins/jf3-maintenance-mode/">http://wordpress.org/extend/plugins/jf3-maintenance-mode/</a></p>
<p>It also has some nice IP blocking and cookie features in there to allow access to the right people. I&#8217;m currently using this in an installation where the company in question wanted to ready sites with posts before pushing them out live. Not a bad plan but it can be tricky to implement.</p>
<p>As a bonus here&#8217;s a little code fragment to tell which sites are in and out of maintenance mode&#8230;</p>
<p></p><pre class="crayon-plain-tag">$options = $wpdb-&gt;get_results(&quot;
    SELECT option_value
    FROM {$wpdb-&gt;get_blog_prefix($blog-&gt;blog_id)}options
    WHERE option_name = 'wpjf3_mr'
&quot;);

// If you like you can decode the JSON returned here with json_decode
if (!strstr($options[0]-&gt;option_value, &quot;YES&quot;)) {
//Do something if the site is not on the list of sites in maintenance mode.
}</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2011/12/searching-high-and-low-for-a-wordpress-multisite-maintenance-mode-that-actually-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List WordPress multisite blogs with details</title>
		<link>http://www.spindicator.com/2011/12/list-wordpress-multisite-blogs-with-details/</link>
		<comments>http://www.spindicator.com/2011/12/list-wordpress-multisite-blogs-with-details/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 15:58:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sites]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=27</guid>
		<description><![CDATA[<p>Here&#8217;s a nice little chunk of code to loop through all of the sites in the multisite install and get some details from them along the way&#8230;</p>
 ]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nice little chunk of code to loop through all of the sites in the multisite install and get some details from them along the way&#8230;</p>
<p></p><pre class="crayon-plain-tag">$blogs = $wpdb-&gt;get_results(&quot;
    SELECT blog_id
    FROM {$wpdb-&gt;blogs}
    WHERE site_id = '{$wpdb-&gt;siteid}'
    AND spam = '0'
    AND deleted = '0'
    AND archived = '0'
    ORDER BY path
&quot;);

$sites = array();

foreach ($blogs as $blog) {
    // Get the sitenames
    $sites[$blog-&gt;blog_id] = get_blog_option($blog-&gt;blog_id, 'blogname');

    // Get the tagline out for the blog description
    $sql = &quot;SELECT option_value AS tagline FROM {$wpdb-&gt;get_blog_prefix($blog-&gt;blog_id)}options WHERE option_name = 'blogdescription';&quot;;
    $description = $wpdb-&gt;get_results($sql);
    $tagline[$blog-&gt;blog_id] = $description[0]-&gt;tagline;
}</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2011/12/list-wordpress-multisite-blogs-with-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing cursor: hand to cursor: pointer</title>
		<link>http://www.spindicator.com/2011/12/changing-cursor-hand-to-cursor-pointer/</link>
		<comments>http://www.spindicator.com/2011/12/changing-cursor-hand-to-cursor-pointer/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 14:07:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[hand]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[pointer]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=14</guid>
		<description><![CDATA[<p>Ever wonder why this doesn&#8217;t work in Mozilla / Firefox? Well, that&#8217;s an IE only supported CSS word. Use this one instead&#8230; Job done!</p>
 ]]></description>
			<content:encoded><![CDATA[<p>Ever wonder why this doesn&#8217;t work in Mozilla / Firefox?</p>
<p></p><pre class="crayon-plain-tag">cursor: hand;</pre><p></p>
<p>Well, that&#8217;s an IE only supported CSS word. Use this one instead&#8230;</p>
<p></p><pre class="crayon-plain-tag">cursor: pointer;</pre><p></p>
<p>Job done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2011/12/changing-cursor-hand-to-cursor-pointer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Redirect from an old domain to your current one</title>
		<link>http://www.spindicator.com/2011/12/redirect-from-an-old-domain-to-your-current-one/</link>
		<comments>http://www.spindicator.com/2011/12/redirect-from-an-old-domain-to-your-current-one/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 16:27:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.spindicator.com/?p=5</guid>
		<description><![CDATA[<p>Assuming that you are hosting on some platform that recognises .htaccess files you are put the following in your .htaccess file. Great if you have moved your blog since it redirects and preserves any querystring on the end of the URL.</p>
 ]]></description>
			<content:encoded><![CDATA[<p>Assuming that you are hosting on some platform that recognises .htaccess files you are put the following in your .htaccess file. Great if you have moved your blog since it redirects and preserves any querystring on the end of the URL.</p>
<p></p><pre class="crayon-plain-tag">Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.something\.co\.uk [NC]
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)$ http://www.something.com/$1?%1 [R=301,L]</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spindicator.com/2011/12/redirect-from-an-old-domain-to-your-current-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

