<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Bitvolution Web Development</title>
	
	<link>http://www.bitvolution.com</link>
	<description>We make web-sites. Do you want one?</description>
	<lastBuildDate>Mon, 12 Dec 2011 08:23:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/bitvolution" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="bitvolution" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Ubuntu is starting to fail me more and more often</title>
		<link>http://www.bitvolution.com/ubuntu-is-starting-to-fail-me-more-and-more-often</link>
		<comments>http://www.bitvolution.com/ubuntu-is-starting-to-fail-me-more-and-more-often#comments</comments>
		<pubDate>Mon, 12 Dec 2011 08:23:10 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://bitvolution.bitmortar.com/?p=985</guid>
		<description><![CDATA[My Uncle mentioned that the audio on this aging PC wasn&#8217;t working ever since he got it &#8220;repaired&#8221;. It was running Windows XP and we were initially unable to find the right audio drivers online so I thought I&#8217;d give Ubuntu a go on it. Sure enough, the audio worked fine in Ubuntu. However, with [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bitvolution.com/files/2011/12/ubuntu_fail_logo.jpg" alt="" title="ubuntu fail logo" width="300" height="274" class="alignleft size-full wp-image-994" />My Uncle mentioned that the audio on this aging PC wasn&#8217;t working ever since he got it &#8220;repaired&#8221;. It was running Windows XP and we were initially unable to find the right audio drivers online so I thought I&#8217;d give Ubuntu a go on it. Sure enough, the audio worked fine in Ubuntu. However, with the machine running Ubuntu, it was incredibly slow and unstable. It crashed every 5 mins with either a white screen of death or a screen that looked like a jail with vertical bars going across it. My uncle said &#8221;</p>
<blockquote><p>Yeah, this ooobuntooo thing is ok but it keeps freezing like a zoo and I have to switch the computer off and on again</p></blockquote>
<p>&#8221; <img src='http://www.bitvolution.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  . </p>
<p>I tried Linux Mint 12 instead of Ubuntu and got the same instablility. I was left with no choice other than to leave with Windows set as the default grub option. Oh Ubuntu, you have failed me &#8211; <strong>You are slower and less stable than Windows XP</strong>, on at least 1 machine. In fact Windows was a better experience in terms of speed and stability by a significant distance! Sad days. Ubuntu, please step-up. I love you, but only because you are better than the competition.</p>
<p>Another problem that left a sour taste in my month was that my Uncles old monitor didn&#8217;t like grub and switched off after the initial bios splash screen, kept switched off during grub and then switched back on when the OS actually started booting. Luckily I guessed than Ubuntu is usually at the top of the menu and Windows at the bottom so was able to choose the right OS even though nothing was on the screen. but having grub invisible is not a good user experience! And it make it tricky to change the default to Windows (I had to guess the <code>GRUB_DEFAULT</code> value in <code>/etc/default/grub</code>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/ubuntu-is-starting-to-fail-me-more-and-more-often/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing WiFi on a Dell XPS L702x Laptop in Ubuntu 11.04</title>
		<link>http://www.bitvolution.com/fixing-wifi-on-a-dell-xps-l702x-laptop-in-ubuntu-11-04</link>
		<comments>http://www.bitvolution.com/fixing-wifi-on-a-dell-xps-l702x-laptop-in-ubuntu-11-04#comments</comments>
		<pubDate>Sun, 10 Jul 2011 19:15:41 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[CommandLine]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bitvolution.bitmortar.com/?p=969</guid>
		<description><![CDATA[I have a Dell XPS L702x Laptop and the wireless is dodgy in Ubuntu 11.04. By Dodgy I mean it drops out and doesn&#8217;t automatically connect very often especially when a Ethernet cable is unplugged. It seems the problem is that Ubuntu doesn&#8217;t get on well with wireless-N (perhaps the driver is buggy?). I fixed [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bitvolution.com/files/2011/07/Dell_XPS_L702x.jpg" alt="Dell XPS L702x" title="Dell XPS L702x" width="284" height="280" class="alignleft size-full wp-image-977" />I have a Dell XPS L702x Laptop and the wireless is dodgy in Ubuntu 11.04. By Dodgy I mean it drops out and doesn&#8217;t automatically connect very often especially when a Ethernet cable is unplugged. It seems the problem is that Ubuntu doesn&#8217;t get on well with wireless-N (perhaps the driver is buggy?). I fixed it by disabling wireless N (but leaving G working):</p>
<p>First check to see that b, g and <strong>n</strong> is enabled:</p>
<p><code>&gt; iwconfig<br />
wlan0     IEEE 802.11bgn  ESSID:"WKIXNTOM"<br />
we need:<br />
wlan0     IEEE 802.11bg  ESSID:"WKIXNTOM"<br />
</code></p>
<p>To disable Wireless N, create a file called <code>/etc/modprobe.d/iwlagn.conf</code> and put the disable incarnation in it:<br />
<code>&gt; sudo vi /etc/modprobe.d/iwlagn.conf<br />
add:<br />
options iwlagn 11n_disable50=1 11n_disable=1<br />
</code></p>
<p>Restart the computer to finish.</p>
<p>I agree this isn&#8217;t a ideal solution (<strong>to say the least!</strong>), but it&#8217;ll do for now.</p>
<p><em>Update after 2 months:</em> Wireless has been reliable and steady since making the above change.</p>
<p><em>Update (15/Oct/11):</em> This &#8220;hack&#8221; is a disaster for Ubuntu 11.10 Oneiric Ocelot, it causes Wireless to fail to load. Be sure to remove the <code>/etc/modprobe.d/iwlagn.conf</code> file when upgrading to Ubuntu 11.10. I found this issue the hard way: <a href="http://askubuntu.com/questions/67097/wireless-no-longer-works-after-upgrade-to-11-10-on-dell-xps-l702x/67118">askubuntu question</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/fixing-wifi-on-a-dell-xps-l702x-laptop-in-ubuntu-11-04/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress failing to email me about new blog comments</title>
		<link>http://www.bitvolution.com/wordpress-failing-to-email-me-about-new-blog-comments</link>
		<comments>http://www.bitvolution.com/wordpress-failing-to-email-me-about-new-blog-comments#comments</comments>
		<pubDate>Sun, 13 Feb 2011 18:40:44 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Sendmail]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://bitvolution.bitmortar.com/?p=931</guid>
		<description><![CDATA[Did you know that WordPress sends you emails when you get a new blog comment? I didn&#8217;t &#8211; because it has never worked for me. But once I knew it was supposed to email me I looked into it and found a fix. Setup: My setup is running WordPress.org on a Ubuntu 9.04 box called [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bitvolution.com/files/2009/12/WordpressLogo_blue-m.png" alt="Wordpress Logo" width="100" height="100" class="alignleft size-full wp-image-611" style="padding: 20px" /></p>
<p>Did you know that WordPress sends you emails when you get a new blog comment? <em>I didn&#8217;t</em> &#8211; because it has never worked for me. But once I knew it was supposed to email me I looked into it and found a fix.</p>
<p><em>Setup:</em> My setup is running WordPress.org on a Ubuntu 9.04 box called <em>Butterfree</em> with sendmail installed.</p>
<p>The problem was that the <code>Return-Path</code> header in my outgoing mails wasn&#8217;t valid which caused some mail recipients to reject the mail, while other less picky ones, accepted the mail fine (e.g. gmail). The <code>Return-Path</code> header that sendmail was using looked something like this:</p>
<pre>
Return-Path: &lt;www-data@butterfree.bitvolution.com&gt;
</pre>
<p></p>
<p>
I found this by changing the admin email from the one that didn&#8217;t work to a gmail one, then posting a test comment on one of my posts. Then I waited for the email to arrive in gmail and selected &#8220;<em>show original</em>&#8221; from the gmail interface. A quicker way is to check the entries in <code>/var/log/mail.log</code>.</p>
<p>In order to fix the issue, I configured the return path in emails sent from WordPress (i.e. PHP) to something different using the <code>-f</code> parameter for sendmail:</p>
<p><span class="iconTerminal">sudo emacs /etc/php5/apache2/php.ini</span></p>
<p>Find the <code>sendmail_path</code> and uncomment it and add the <code>-f</code> flag:<br />
<code><br />
; -f will set the "return-path" headers.<br />
sendmail_path = /usr/sbin/sendmail -i -t -f sendmail@bitvolution.com<br />
</code></p>
<p>Doing this solved this issue so I now get email about new comments.</p>
<p>My fix feels a bit of a hack. I would be interested in how to solve this problem the right way, so let me know if you can give me some advice. For example, perhaps I should have done something with my DNS settings for my domain?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/wordpress-failing-to-email-me-about-new-blog-comments/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session sharing in PHP – The easy way</title>
		<link>http://www.bitvolution.com/session-sharing-in-php-the-easy-way</link>
		<comments>http://www.bitvolution.com/session-sharing-in-php-the-easy-way#comments</comments>
		<pubDate>Mon, 02 Aug 2010 07:49:58 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.bitvolution.com/?p=881</guid>
		<description><![CDATA[I used to think that a hard part of scaling a website from one webserver to two webservers was sharing the sessions between the machines to keep the users logged in whichever machine they were served by. I was pleasantly surprized that it is possible to accomplish sharing sessions between two servers by changing only [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.php.net/"><img src="http://www.bitvolution.com/files/2010/08/logoPHP.png" alt="" width="100" height="53" class="alignleft size-full wp-image-896" /></a></p>
<p>I used to think that a hard part of scaling a website from one webserver to two webservers was sharing the sessions between the machines to keep the users logged in whichever machine they were served by. I was pleasantly surprized that it is possible to accomplish sharing sessions between two servers by changing only 5 lines in the <em>php.ini</em> file (the 2 biggies are <code>session.save_handler</code> and <code>session.save_path</code>).</p>
<p>Here is a solution for <a href="http://www.redhat.com/rhel/">RHEL 5.5</a>:</p>
<p><span id="more-881"></span></p>
<ol>
<li>Install the <a href="http://memcached.org/">memcached</a> server &#8211; <em>a distributed memory object caching system</em>:
<ul>
<li><em>libmemcached</em> is unfortunately not part of the RHEL standard packages so we have to install a third party repository first following instructions at <a href="http://blog.famillecollet.com/pages/Config-en">http://blog.famillecollet.com/pages/Config-en</a>.</li>
<li>After installing the 3rd party repo, install <em>libmemcached</em>: <span class="iconTerminal">sudo yum &#8211;enablerepo=epel &#8211;enablerepo=remi update memcached &amp;&amp; sudo yum &#8211;enablerepo=epel &#8211;enablerepo=remi install libmemcached libmemcached-devel</span></li>
</ul>
</li>
<li>Install the PHP memcache client: <span class="iconTerminal">sudo pecl install memcache-3.0.3</span>
<ul>
<li>The memcache PECL extension includes a session handler which gives us a alternative option to the default PHP session handler (which uses files). Be sure to answer &#8220;yes&#8221; when the installer asks to &#8220;<em>Enable memcache session handler support?</em>&#8220;.</li>
</ul>
</li>
</li>
<li>Modify the <em>php.ini</em> file of both servers (e.g. <em>/etc/php.ini</em>) so that the PHP memcache client is used instead of session files:<br />
<code><s>session.save_handler = files</s><br />
session.save_handler = memcache</code>
</li>
<li>Modify the PHP <em>memcache.ini</em> file of both servers (e.g. <em>/etc/php.d/memcache.ini</em>) so that the PHP memcache client is configured to share sessions with redundancy and failover support:<br />
<code>memcache.hash_strategy = consistent<br />
memcache.allow_failover = 1<br />
memcache.session_redundancy=2<br />
session.save_path="tcp://192.168.0.1:11211, tcp://192.168.0.2:11211"</code>
</li>
</ol>
<p>This approach shares sessions between both machines using RAM as storage. The PHP memcache client cleverly writes the session data to both machines so that if one machine fails all users will still be logged in when they are served by the remaining machine.</p>
<p>My exploration of this subject is documented on serverfault: <a href="http://serverfault.com/questions/164350/can-a-pool-of-memcache-daemons-be-used-to-share-sessions-more-efficiently">can-a-pool-of-memcache-daemons-be-used-to-share-sessions-more-efficiently</a>. My conclusion is that this method of session sharing is not the best approach but it is the simplest to set up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/session-sharing-in-php-the-easy-way/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress spelling auto-correction now fixed</title>
		<link>http://www.bitvolution.com/wordpress-spelling-auto-correction-now-fixed</link>
		<comments>http://www.bitvolution.com/wordpress-spelling-auto-correction-now-fixed#comments</comments>
		<pubDate>Mon, 02 Aug 2010 07:05:27 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.bitvolution.com/?p=870</guid>
		<description><![CDATA[In WordPress 3.0, my WordPress logo image (on the left) broke. So I opened a bug and six weeks and 100 bug comments later, I have upgraded to 3.01 and it is working again. Thanks guys! The reason why the logo image was broken was quite interesting(?)&#8230; In v3.0 WordPress automatically started auto-correcting Wordpress to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bitvolution.com/files/2009/12/WordpressLogo_blue-m.png" alt="Wordpress Logo" width="100" height="100" class="alignleft size-full wp-image-611" style="padding: 20px" /></p>
<p>In WordPress 3.0, my WordPress logo image (<em>on the left</em>) broke. So I <a href="http://core.trac.wordpress.org/ticket/13971">opened a bug</a> and six weeks and 100 bug comments later, I have upgraded to 3.01 and it is working again. Thanks guys!</p>
<p>The reason why the logo image was broken was quite interesting(?)&#8230; In v3.0 WordPress automatically started auto-correcting Word<strong>p</strong>ress to Word<strong>P</strong>ress (i.e. Word-lowercase-p-ress to Word-uppercase-P-ress) and because my image file name was called &#8220;Word<strong>p</strong>ressLogo_blue-m.png&#8221;, the auto-correction was breaking the link. Auto-correction shouldn&#8217;t cause links to break and it seems that v3.01 fixes it.</p>
<p>The filter function that does this auto-correction is called &#8220;<em>capital_P_dangit</em>&#8221; &#8211; The WordPress guys are obviously pretty frustrated by this spelling mistake!</p>
<p><strong>Old filter (v3.0):</strong></p>
<pre class="brush: php; title: ; notranslate">
function capital_P_dangit( $text ) {
       return str_replace( 'Wordpress', 'WordPress', $text );
}
</pre>
<p><strong>New filter (v3.01):</strong></p>
<pre class="brush: php; title: ; notranslate">
function capital_P_dangit( $text ) {
        // Simple replacement for titles
        if ( 'the_title' === current_filter() )
                return str_replace( 'Wordpress', 'WordPress', $text );
        // Still here? Use the more judicious replacement
        static $dblq = false;
        if ( false === $dblq )
                $dblq = _x('&#8220;', 'opening curly quote');
        return str_replace(
                array( ' WordPress', '&#8216;WordPress', $dblq . 'Wordpress', '&gt;Wordpress', '(WordPress' ),
                array( ' WordPress', '&#8216;WordPress', $dblq . 'WordPress', '&gt;WordPress', '(WordPress' ),
        $text );
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/wordpress-spelling-auto-correction-now-fixed/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress image gallery plugin</title>
		<link>http://www.bitvolution.com/wordpress-image-gallery-plugin</link>
		<comments>http://www.bitvolution.com/wordpress-image-gallery-plugin#comments</comments>
		<pubDate>Fri, 16 Apr 2010 11:42:52 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.bitvolution.com/?p=819</guid>
		<description><![CDATA[When I was building the property gallery for greekislandpropertyfinders I wanted to use a fancy javascript image gallery like Galleria, however I came across a problem with Galleria in that it couldn&#8217;t display more than one gallery on any page. It&#8217;s open-source so I used the source code to help write my own version and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bitvolution.com/files/2009/12/WordpressLogo_blue-m.png" alt="Wordpress Logo" width="100" height="100" class="alignleft size-full wp-image-611" style="padding: 20px" /></p>
<p>When I was building the property gallery for <a href="http://www.greekislandpropertyfinders.co.uk/what-we-are-finding">greekislandpropertyfinders</a> I wanted to use a fancy javascript image gallery like <a href="http://devkick.com/lab/galleria/">Galleria</a>, however I came across a problem with <em>Galleria</em> in that it couldn&#8217;t display more than one gallery on any page. It&#8217;s open-source so I used the source code to help write my own version and turned it into a WordPress plugin with the features I needed.</p>
<p>The plugin isn&#8217;t all that generalised, so I&#8217;m not sure it&#8217;ll be useful to many people but I think it&#8217;s a tool worth sharing.</p>
<p>Plugin features:</p>
<ul>
<li>This plugin doesn&#8217;t change the WordPress media gallery admin interface &#8211; galleries are created and inserted into pages/posts as normal (i.e. using the media upload GUI + the <code><br />
&#091;gallery]</code> shortcode). WordPress authors won&#8217;t need to change or learn anything new.</li>
<li>The plugin makes efficient use of WordPress media (no front-end image resizing via CSS!) which means it doesn&#8217;t matter if one of your authors uploads a load of 3MB images to a gallery &#8211; it&#8217;ll still run fast.</li>
<li>The plugin doesn&#8217;t pre-download images that aren&#8217;t needed &#8211; it displays a loading spinner image when the user is waiting for a image on load.</li>
<li>Should be easy to style the gallery in your own way &#8211; uses CSS classes and IDs.</li>
<li>The user can click on the main image to cycle through the gallery.</li>
<li>Uses jQuery for cross-browser hover fade effects.</li>
<li>Small JS footprint: 2854 bytes.</li>
<li>Outputs valid XHTML (unlike the default WordPress gallery!).</li>
</ul>
<p>Screenshot of the plugin:<br />
<div id="attachment_828" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.bitvolution.com/files/2010/04/screenshot-1.png"><img src="http://www.bitvolution.com/files/2010/04/screenshot-1-300x139.png" alt="Screenshot of Bitvolution-image-galleria plugin" width="300" height="139" class="size-medium wp-image-828" /></a><p class="wp-caption-text">Click to enlarge</p></div></p>
<p>Demo of plugin: <a href="http://www.greekislandpropertyfinders.co.uk/what-we-are-finding">www.greekislandpropertyfinders.co.uk/what-we-are-finding</a>.</p>
<p>Download the plugin from the <a href='http://wordpress.org/extend/plugins/bitvolution-image-galleria/'>WordPress.org plugin directory</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/wordpress-image-gallery-plugin/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Batch optimise Images with a single command</title>
		<link>http://www.bitvolution.com/batch-optimise-images-with-a-single-command</link>
		<comments>http://www.bitvolution.com/batch-optimise-images-with-a-single-command#comments</comments>
		<pubDate>Thu, 04 Mar 2010 17:01:53 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CommandLine]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.bitvolution.com/?p=796</guid>
		<description><![CDATA[I find the Page Speed tool from Google extremely helpful for optimising my websites. I have a tip which can save time if your website is failing the &#8220;Optimize Images&#8221; test. Using the in-built Smush.it is one option but if most of your images are jpegs, you can achieve the same result and save time [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bitvolution.com/files/2010/03/pageSpeedScreenshot.png"><img src="http://www.bitvolution.com/files/2010/03/pageSpeedScreenshot-300x128.png" alt="Screenshot of Page Speed in Firebug" width="300" height="128" class="alignleft size-medium wp-image-797" /></a><br />
I find the <a href="http://code.google.com/speed/page-speed/">Page Speed</a> tool from Google extremely helpful for optimising my websites. I have a tip which can save time if your website is failing the &#8220;<em>Optimize Images</em>&#8221; test. Using the in-built <a href="http://developer.yahoo.com/yslow/smushit/">Smush.it</a> is one option but if most of your images are jpegs, you can achieve the same result and save time using a command line tool called <strong>jpegtran</strong> with the <code>-optimise</code> parameter to do lossless compression and the <code>-copy none</code> parameter to strip out image meta-data.</p>
<p><em>Disclaimer: As with any image processing always keep a copy of the original images.</em></p>
<p>To install <strong>jpegtran</strong> in Ubuntu, do:<br /><span class="iconTerminal">sudo apt-get install libjpeg-progs</span></p>
<ul class="tickList">
<li>To optimise a single jpeg image:<br /><span class="iconTerminal">jpegtran -copy none -optimise -outfile image.jpg image.jpg</span></li>
<li>To optimise all jpegs in the current directory:<br /><span class="iconTerminal">for img in `ls *.jpg`; do jpegtran -copy none -optimise -outfile $img $img; done</span></li>
<li>To optimise all jpegs in the current directory and all child directories:<br /><span class="iconTerminal">find . -name &#8220;*.jpg&#8221; -print0 | xargs -0 -I filename jpegtran -copy none -optimise -outfile filename filename</span></li>
</ul>
<p>If you need to optimise various image formats, there is a PHP CLI tool called <a href="http://github.com/ecentinela/smusher">smusher</a> which uses <em>Smush.it</em> and can work recursively on directories. Might be worth a look. It would be nice if <em>Smush.it</em> had a API &#8211; their FAQ <a href="http://developer.yahoo.com/yslow/smushit/faq.html#faq_api">mentions they are working on it</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/batch-optimise-images-with-a-single-command/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>greekislandpropertyfinders.co.uk</title>
		<link>http://www.bitvolution.com/greekislandpropertyfinders-co-uk</link>
		<comments>http://www.bitvolution.com/greekislandpropertyfinders-co-uk#comments</comments>
		<pubDate>Fri, 19 Feb 2010 11:00:41 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Client Work]]></category>
		<category><![CDATA[GIPF]]></category>

		<guid isPermaLink="false">http://www.bitvolution.com/?p=783</guid>
		<description><![CDATA[We have just finished and published greekislandpropertyfinders.co.uk which is a modified clone of http://www.heidijoycegardens.com. Technical details of site: The site is written in PHP using WordPress as a development framework. Uses the 1KB CSS grid framework. Uses Jquery including the anything slider and Galleria. The site has a newsletter sign-up form written as a WordPress [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bitvolution.com/files/2010/02/Greek-Island-Property-Finders_1266706587041.png"><img src="http://www.bitvolution.com/files/2010/02/Greek-Island-Property-Finders_1266706587041-300x225.png" alt="Greek Island Property Finders Screenshot" width="300" height="225" class="alignleft size-medium wp-image-782 bordered" /></a></p>
<p>We have just finished and published <a href="http://www.greekislandpropertyfinders.co.uk/">greekislandpropertyfinders.co.uk</a> which is a modified clone of  <a href="http://www.heidijoycegardens.com">http://www.heidijoycegardens.com</a>.</p>
<p>Technical details of site:</p>
<ul class="bulletsInside">
<li>The site is written in PHP using <a href="http://wordpress.org/">WordPress</a> as a development framework.</li>
<li>Uses the <a href="http://www.1kbgrid.com/">1KB CSS grid framework</a>.</li>
<li>Uses Jquery including the <a href="http://css-tricks.com/anythingslider-jquery-plugin/">anything slider</a> and <a href="http://devkick.com/lab/galleria/">Galleria</a>.</li>
<li>The site has a newsletter sign-up form written as a WordPress theme function.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/greekislandpropertyfinders-co-uk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Tag Cloud – How to cap the font size</title>
		<link>http://www.bitvolution.com/wordpress-tag-cloud-how-to-cap-the-font-size</link>
		<comments>http://www.bitvolution.com/wordpress-tag-cloud-how-to-cap-the-font-size#comments</comments>
		<pubDate>Thu, 18 Feb 2010 13:01:51 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.bitvolution.com/?p=734</guid>
		<description><![CDATA[On this WordPress theme, the sidebar is quite small (only 220px) and the default WordPress tag cloud widget was producing tags that were clipped in a ugly manner. By default, the WordPress tag cloud widget has a maximum font size of 22px so I was looking for a way to reduce it. Note: If you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bitvolution.com/files/2010/02/tag_too_big.png" alt="Screenshot of problem with too big tag" width="242" height="319" class="alignleft size-full wp-image-733 bordered" /></p>
<p>On this WordPress theme, the sidebar is quite small (only 220px) and the default WordPress tag cloud widget was producing tags that were clipped in a ugly manner. By default, the WordPress tag cloud widget has a maximum font size of 22px so I was looking for a way to reduce it.</p>
<p><em>Note:</em> If you are not a theme editor, you might find it easier to just install a suitable tag cloud plugin, e.g.<a href="http://wordpress.org/extend/plugins/configurable-tag-cloud-widget/"> Configurable Tag Cloud (CTC)</a>.</p>
<p>The WordPress tag cloud widget already allows you to specify various options including the largest font size, e.g. <code>&lt;?php wp_tag_cloud('largest=18'); ?&gt;</code> so we only need to create a new widget that overrides the default widget and then unregister the default widget so there aren&#8217;t two widgets with the same name in the &#8220;Available Widgets&#8221; dashboard page. We can register our own widget using <a href="http://codex.wordpress.org/Function_Reference/register_sidebar_widget">register_sidebar_widget</a> and we can unregister the default tag cloud widget using <code>unregister_widget('WP_Widget_Tag_Cloud');</code>.</p>
<p>This is the code you need &#8211; put it in the <em>functions.php</em> file in your WordPress theme folder:</p>
<pre class="brush: php; title: ; notranslate">
add_action(&quot;widgets_init&quot;, array('Tag_cloud_withLimitedFontSize', 'register'));

/** Widget - Override the default WordPress tag cloud BUT cap the largest font size to 18 (instead of 22)\
 because at 22 some tags don't fit in the sidebar. */
class Tag_cloud_withLimitedFontSize
{
  function widget($args){
    echo $args['before_widget'];
    echo $args['before_title'] . 'Tags' . $args['after_title'];
    echo wp_tag_cloud('largest=18');
    echo $args['after_widget'];
  }

  function register()
  {
    register_sidebar_widget('Tag Cloud', array('Tag_cloud_withLimitedFontSize', 'widget'));
    unregister_widget('WP_Widget_Tag_Cloud');
  }
}
</pre>
<p>If there&#8217;s a better way to do this, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/wordpress-tag-cloud-how-to-cap-the-font-size/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox 3.6 opacity crash in Linux</title>
		<link>http://www.bitvolution.com/firefox-3-6-opacity-crash-in-linux</link>
		<comments>http://www.bitvolution.com/firefox-3-6-opacity-crash-in-linux#comments</comments>
		<pubDate>Thu, 11 Feb 2010 21:10:43 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[WebDevelopment]]></category>

		<guid isPermaLink="false">http://www.bitvolution.com/?p=691</guid>
		<description><![CDATA[A website that I was working on suddenly started crashing Firefox 3.6 on my PC (Ubuntu 9.10, 64bit). I&#8217;m talking a full out hang with 100% CPU usage and a frozen mouse and keyboard and the only way to recover is to remote login from a 2nd PC and kill the Firefox process. I found [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bitvolution.com/files/2010/02/bugAsAChip.jpg" alt="Microchip as a bug" width="216" height="147" class="alignleft size-full wp-image-697" /></p>
<p>A website that I was working on suddenly started crashing Firefox 3.6 on my PC (Ubuntu 9.10, 64bit). I&#8217;m talking a full out hang with 100% CPU usage and a frozen mouse and keyboard and the only way to recover is to remote login from a 2nd PC and kill the Firefox process.</p>
<p>I found the cause of the crash and it was a single line of recently added CSS code at the top of the websites stylesheet: <code>body { opacity: 0.9999; }</code></p>
<p>So, if you run a website, be careful of non-100% <em>opacity</em> when it affects many elements. I have hosted <a href="http://www.bitvolution.com/demo/firefox36opacitybugtest.html">a page that reproduces the issue</a> and found a bug that tracks the issue: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=279890">#279890</a>. This CSS is also a problem on Windows &#8211; it causes text to blur horribly in IE 7 in some situations.</p>
<p><em>What is that CSS for anyway?</em> Firefox 2.0 on Macs used to have a problem where text could dim or get bold or flicker when a animated effect that changed the opacity of an element was used. It was caused because the use of a <em>opacity filter</em> triggered the Gecko rendering engine to switch from the operating system’s method of anti-aliasing to its own internal method. Whenever opacity dropped below 100% the mode switched and resulted in a defect such as a flicker or blink. The fix was simple &#8211; all that was needed was to add <code>body { -moz-opacity: 0.9999; }</code> to the stylesheet because it would force Firefox to use a consistent text rendering method.</p>
<div style="font-family:Purisa,arial">Hack == Bug</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bitvolution.com/firefox-3-6-opacity-crash-in-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

