<?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>Blog Random &#187; Googled</title>
	<atom:link href="http://www.blograndom.com/blog/tag/googled/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blograndom.com/blog</link>
	<description>Technology, website development, reviews and how-to's</description>
	<lastBuildDate>Sat, 07 May 2011 17:42:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Deleting duplicate mdir emails using php</title>
		<link>http://www.blograndom.com/blog/2008/03/deleting-duplicate-mdir-emails-using-php/</link>
		<comments>http://www.blograndom.com/blog/2008/03/deleting-duplicate-mdir-emails-using-php/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 23:48:58 +0000</pubDate>
		<dc:creator>Cohen</dc:creator>
				<category><![CDATA[Googled]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.blograndom.com/blog/?p=45</guid>
		<description><![CDATA[In an attempt to speed up my imap access I moved old emails in to folders based on year. This speed up process majorly backfired when imap/mdir decided to make 7 copies of each email in the same folder. I ended up with 27,000 emails in my 2006 folder! With my mailbox quota full I [...]]]></description>
			<content:encoded><![CDATA[<p>In an attempt to speed up my imap access I moved old emails in to folders based on year. This speed up process majorly backfired when imap/mdir decided to make 7 copies of each email in the same folder. I ended up with 27,000 emails in my 2006 folder!</p>
<p>With my mailbox quota full I needed a quick solution&#8230; and couldn&#8217;t find one! <a href="https://addons.mozilla.org/en-US/thunderbird/addon/956">Thunderbird has a plugin that will search for and delete duplicate messages</a> but it runs over imap which crippled the server trying to handle all the requests.</p>
<p>Using Google I stumbled across <a href="http://kremvax.net/howto/mail-duplicates.html" target="_blank">this solution for finding and deleting duplicate messages using reformail </a>but after getting reformail installed I found it to be very slow and the number of messages to delete didn&#8217;t add up so I had to abandon this approach.</p>
<p>In the end I decided to write my own PHP script that would cycle through the specific mail directory, search for duplicate messages based on the Message-Id (or a checksum of the email if not available) and then delete the unnecessary, duplicate emails. It worked a treat, and went through the 27,000 emails in less than 5 minutes! If anybody wants the code, its below!</p>
<p><span id="more-45"></span></p>
<p>All you need to do is change the dir variable at the top to the location of your mdir folder that contains all the duplicates. In my case it was a folder called 2006, so you&#8217;d use &#8230;../.2006/cur/. I suggest you run the script once with $delete set to false to check that the stats it echoes out sound correct. If they do just change $delete to true and let it run! Hope this helps somebody.</p>
<p><code>&lt;?php</code></p>
<p>$dir = &#8216;/home/username/mail/domain.com/user/.2006/cur/&#8217;;<br />
$delete = false; // set to true after testing to actually delete them</p>
<p>$emails = scandir($dir);</p>
<p>$found = array();<br />
$dups = 0;<br />
$actual = 0;<br />
$blank = 0;</p>
<p>$i = 0;<br />
foreach($emails AS $file){</p>
<p>set_time_limit(20);</p>
<p>if($file == &#8216;.&#8217; OR $file == &#8216;..&#8217;) continue;</p>
<p>$i++;<br />
//if($i &gt; 1000) break; // temp stopper</p>
<p>$messageIds = false;</p>
<p>$email = file_get_contents($dir . $file);<br />
preg_match(&#8216;#Message-ID:(s+)&lt;([^&gt;]+)&gt;#is&#8217;, $email, $messageIds);</p>
<p>if(!is_array($messageIds) OR !isset($messageIds[2]) OR empty($messageIds[2])){<br />
$messageIds[2] = &#8216;md5_&#8217; . md5($email);<br />
$blank++;<br />
}</p>
<p>$messageId = $messageIds[2];</p>
<p>if(in_array($messageId, $found)){<br />
// message is a dup, delete<br />
if($delete) unlink($dir . $file);<br />
$dups++;<br />
}else{<br />
$found[] = $messageId;<br />
$actual++;<br />
}</p>
<p>}</p>
<p>echo &#8216;Found &#8216; . $i . &#8216; emails&#8217; . &#8220;&lt;br/&gt;n&#8221;;<br />
echo &#8216;Found &#8216; . $dups . &#8216; duplicates&#8217; . &#8220;&lt;br/&gt;n&#8221;;<br />
echo &#8216;Leaving &#8216; . $actual . &#8216; originals&#8217; . &#8220;&lt;br/&gt;n&#8221;;<br />
echo &#8216;With &#8216; . $blank . &#8216; without message IDs&#8217; . &#8220;&lt;br/&gt;n&#8221;;</p>
<p>?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blograndom.com/blog/2008/03/deleting-duplicate-mdir-emails-using-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing the power supply unit on a powermac g5, after it blows up!</title>
		<link>http://www.blograndom.com/blog/2007/11/changing-the-power-supply-unit-on-a-powermac-g5-after-it-blows-up/</link>
		<comments>http://www.blograndom.com/blog/2007/11/changing-the-power-supply-unit-on-a-powermac-g5-after-it-blows-up/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 21:18:36 +0000</pubDate>
		<dc:creator>Cohen</dc:creator>
				<category><![CDATA[Googled]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.blograndom.com/blog/changing-the-power-supply-unit-on-a-powermac-g5-after-it-blows-up/</guid>
		<description><![CDATA[If the PSU on you&#8217;re powermac g5 has gone, or you think it may have, you aren&#8217;t the only one (see macintouch forums). When I was reading around on the subject I read the failure rate is around 11%, I can&#8217;t remember the exact figure but hopefully I&#8217;ll find it again later. Luckily Apple did [...]]]></description>
			<content:encoded><![CDATA[<p>If the PSU on you&#8217;re powermac g5 has gone, or you think it may have, you aren&#8217;t the only one (<a href="http://www.macintouch.com/readerreports/powermacg5/topic4026.html">see macintouch forums</a>). When I was reading around on the subject I read the failure rate is around 11%, I can&#8217;t remember the exact figure but hopefully I&#8217;ll find it again later. Luckily Apple did acknowledge the problem and has extended the warranty on the power supply, which you can claim here: <a href="http://www.apple.com/au/support/powermac/powersupply/repairextension/">Power Mac G5 Repair Extension Program for Power Supply Issues</a></p>
<p>A relatively new customer phoned us up last week in a panic, claiming his server (the powermac) had stopped working and wouldn&#8217;t even switch on. We&#8217;d recently set-up a remote backup solution for him and installed an extra internal hard drive in the powermac for local backup.  I&#8217;m guessing the extra load of the hard drive took it over the edge. Needless to say he needed the server back up asap.</p>
<p>Phoning around we found one supplier with a spare powermac psu in stock. None of the local apple stores did and most companies sounded confused, as if I was asking a silly question. We ended up paying £150-£200 for the psu, a little on the expensive side but desperate times call for desperate measures.</p>
<p><span id="more-36"></span></p>
<p>I&#8217;m definitely not an expert with mac hardware and I don&#8217;t have special tools for taking apart a computer &#8211; this scared me &#8211; because everybody I spoke to or every article I read said not to change the psu yourself and to take it to a professional. My advice would probably be this too, it isn&#8217;t for the faint hearted or impatient. But if you&#8217;re up for a bit of a challenge you can&#8217;t do too much damage, read on.</p>
<p>Get hold of a guide to taking apart the mac, such as <a href="http://www.sharpeningbeneath.com/g5guide/">this one</a>. I found a few discrepancies but it gives you a basic idea on how to remove things. To start with, remove <strong>everything</strong>. At first I tried to remove things that looked as if they would be in the way, leaving a few parts behind. Unfortunately the psu is so awkwardly positioned and large that the only way to get it out was to take out everything including the motherboard.</p>
<p>Having removed everything, switch over the psu and put everything back &#8211; simple. In total the changeover took about 2 hours. I used a standard toolkit but struggled with the screws for the processors because you need a very long, very thin screwdriver that will fit through the holes in the heatsink. I got by with a pear of pliers, a screwdriver bit and some brute force but it took forever.</p>
<p>I think as long as you keep the parts and accompanying screws separated in to the order they need to go back in the task becomes less daunting. The case on these powermacs aren&#8217;t small but then neither is the space left over. There are a lot of tightly packed components in the machine and it&#8217;s a bit of a puzzle to put back together. <strong>Good luck!</strong></p>
<p>Also worth noting: <em>When you&#8217;re finished with the broken psu most suppliers told me they&#8217;d buy it back for about £50 &#8211; worth a try.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blograndom.com/blog/2007/11/changing-the-power-supply-unit-on-a-powermac-g5-after-it-blows-up/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Age of Empires LAN connection issues</title>
		<link>http://www.blograndom.com/blog/2007/09/age-of-empires-lan-connection-issues/</link>
		<comments>http://www.blograndom.com/blog/2007/09/age-of-empires-lan-connection-issues/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 13:21:24 +0000</pubDate>
		<dc:creator>Cohen</dc:creator>
				<category><![CDATA[Googled]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[problems]]></category>

		<guid isPermaLink="false">http://www.blograndom.com/blog/age-of-empires-lan-connection-issues/</guid>
		<description><![CDATA[I don&#8217;t often get time to play games any more but when I do a quick multiplayer game of Age of Empires 2: The Conquerors is still one of my favourites. Each time I come to play at least one of the computers in the house has been reinstalled and requires AOE to be setup [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t often get time to play games any more but when I do a quick multiplayer game of <em>Age of Empires 2: The Conquerors</em> is still one of my favourites. Each time I come to play at least one of the computers in the house has been reinstalled and requires AOE to be setup on it again.</p>
<p>The problem I always come across, and one that <a href="http://www.google.co.uk/search?q=age+of+empires+2+lan+connection+issues">many others seem to have come across</a>, is that the computers can&#8217;t find the game. None of them have firewalls activated and they are all able to communicate with each other for other tasks</p>
<p>The trick is in the connection type when setting up and joining the game. It seems like a really odd choice but select &#8220;<strong>IPX Connection for Direct Play</strong>&#8220;. The most obvious choice would be a &#8220;TCP/IP Local Area Network&#8221; connection but no games are ever found.</p>
<p><span id="more-5"></span></p>
<p>To use the IPX protocol you may have to set it up in the network settings for your LAN connection. This can be done in a few simple steps:</p>
<ol>
<li>Go to the &#8220;Control Panel&#8221;.</li>
<li>Double-click on &#8220;Network connections&#8221;.</li>
<li>Right click on your LAN Connection and choose Properties.</li>
<li>In the list of protocols, choose Add.</li>
<li>Click Microsoft, and then click IPX/SPX Compatible Protocol</li>
<li>Click ok to add the protocol</li>
<li>You may need to restart</li>
</ol>
<p>If I remember correctly this was also a problem for Age Of Empires 2 without the Conquerors expansion as well. Its always best to double check firewall settings as well because they seem have a habit of blocking things you&#8217;ve already asked them not to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blograndom.com/blog/2007/09/age-of-empires-lan-connection-issues/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Iriver Clix: Napster Synchronise Issue</title>
		<link>http://www.blograndom.com/blog/2007/09/iriver-clix-napster-synchronise-issue/</link>
		<comments>http://www.blograndom.com/blog/2007/09/iriver-clix-napster-synchronise-issue/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 23:38:08 +0000</pubDate>
		<dc:creator>Cohen</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[Googled]]></category>
		<category><![CDATA[problems]]></category>

		<guid isPermaLink="false">http://evolve-server.com/~blogrand/blog/?p=3</guid>
		<description><![CDATA[Switching on my Clix at the gym the other evening I was greeted by the error &#8220;To play this track you must sync your device to your PC&#8220;. A gym session feels a lot longer with only music channels to listen to! I was sure I&#8217;d synchronised my device with Napster recently but to be [...]]]></description>
			<content:encoded><![CDATA[<p>Switching on my Clix at the gym the other evening I was greeted by the error &#8220;<em>To play this track you must sync your device to your PC</em>&#8220;. A gym session feels a lot longer with only music channels to listen to!</p>
<p>I was sure I&#8217;d synchronised my device with Napster recently but to be sure I tried again and even transferred some new songs across to see if that helped but still, the same error for every napster song. I tried a firmware update but was on the latest version and so I decided a format was my only option and should sort out everything &#8211; wrong!<br />
<span id="more-3"></span></p>
<p>As a last resort, I thought I&#8217;d contact Napster support who were actually very helpful (at stay open til 9pm)! They walked me through some steps that would force my device to reload its play for sure licenses. It didn&#8217;t work when I was on the phone to them but I tried the same process again afterwards and somehow, it worked!</p>
<p>After a quick google of the problem I found that a number of people have experienced similar problems with no resolution. If you are one of these people, try this:</p>
<ol>
<li>Format your device <strike>(may be optional)</strike> and unplug it from the computer.</li>
<li>Open windows media player and right click on the &#8220;Sync&#8221; button.</li>
<li> Click on &#8220;More options..&#8221; and go to the &#8220;Privacy&#8221; tab.</li>
<li>At the bottom click on the &#8220;Clear History&#8221; and &#8220;Clear Cache&#8221; buttons.</li>
<li>Close windows media player.</li>
<li>Go to <a href="http://support.microsoft.com/kb/929399">this </a>microsoft support page and download the relevant package for your PC.</li>
<li>Go to the <a href="http://support.napster.com">napster support site</a> and download the file named &#8220;DR1009.exe&#8221; which should force napster to reload the licenses. (Please note the disclaimer at the top of the support page).</li>
<li>Restart your computer and synchronise your device.</li>
</ol>
<p>This process worked for me second time, I think the first time I messed up by leaving me device plugged in. I just hope this helps other music deprived Napster users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blograndom.com/blog/2007/09/iriver-clix-napster-synchronise-issue/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

