Skip to Content

blog post

JetPack sharing icons in WooCommerce products

After installing JetPack the sharing icons appear at the bottom of the post, to shuffle them up to being just under the product description – add the following to your functions.php

add_action( 'woocommerce_share', 'patricks_woocommerce_social_share_icons', 10 );
function patricks_woocommerce_social_share_icons() {
    if ( function_exists( 'sharing_display' ) ) {
        remove_filter( 'the_content', 'sharing_display', 19 );
        remove_filter( 'the_excerpt', 'sharing_display', 19 );
        echo sharing_display();
blog post

Timthumb.php hacked again

I needed a better way to check that my clients were not installing old version of timthumb.php as part of their themes on WordPress. Here’s a reminder for myself and others of simply search and find on a linux server. I’m sure that this could be automated to search, find, and replace with the latest – but as we are only talking less than 30 timthumb files – I’m happy to carry out manually at the moment.

find `pwd` -type f \( -iname thumb.php -or -iname timthumb.php \) -exec grep -HP 'define ?\(.VERSION' {} \;

Will return :

/var/www/vhosts/ ('VERSION', '2.8.3'); // Version of this script
/var/www/vhosts/ ('VERSION', '2.8.3'); // Version of this script
/var/www/vhosts/ ('VERSION', '1.6'); // Version of this script

Any old versions should be replaced with the latest from

blog post

Install VMware Tools in CentOS 6.1 command line

Here is how I went about installing VMware Tools on CentOS 6.1 using the command line.

1.In VMware Fusion or Sphere Client: Virtual Machine / Guest > Install/update VMware Tools
2. Within the VM – using command line (I’m not using x) at the prompt:
3. mkdir /mnt/cdrom
4. mount the virtual cdrom using; mount /dev/cdrom /mnt/cdrom
5. cd /tmp
6. tar -xvf /mnt/cdrom/VMwareTools* or tab to auto complete
7. cd vmware* or tab to auto complete
8. ./; accepting defaults throughout. (If not already installed – yum install perl)
9. umount /mnt/cdrom
10. In Fusion / Vsphere Client VMware tools should now display as installed. Check via Virtual Machine / Guest > Install/VMware Tools > will display as “Reinstall” or “OK” version dependant.

blog post

Macbook Pro Retina – Exploding Pixels?

So myself and @Josh1C both have the lovely Macbook Pro with 15″ Retina display – and both started noticing ‘dead’ pixels at a similar time. Being techies decided that using the digital microscope was definitely required for a closer look, as my wonky eyes struggled to identify how many pixels looked to be at fault (I’m told that to replace a screen – you should have 4 or more bright dead pixels).

With no additional lighting enabled on the digital microscope, you can see the light which leaks through the dead pixel, and why sometimes it appears bluey white or greeny white. What confused us was that unlike the cleanly aligned pixels some of our dead pixels seemed to have misshapen or deformed pixels, so we wondered if there was something other than a non responsive pixel.


We delved a little deeper and back lit the digital microscope to light the pixel grid and the plastic composite front – where we saw the below. At first it appeared as if it was impact damage, like you would see if someone threw a stone at a glass window. Upon further inspection of the two identical Macbooks, both had this ‘explosion’ effect.

1311131756091501156a 1311131757021553718a

(These are the back lit version of the above images, highlighting the ‘exploding’ pixel areas)

We determined that the LED retina displace must be exploding in tiny retina pockets. As to what is causing it is unknown, but we have 2x 11 month old Macbook 15″ Retina with the same issues.

For those wondering, both screens are LG model: LP154WT1-SJA1. Both screens are also experiencing increasingly more prominent ‘ghosting’ and as we work on Windows Servers with the ‘neutral grey’ default background – which highlights the ghosting the most! I can practically read my helpdesk notes even after switching screens to remote desktop!

Anyone else having this issue, please let us know in the comments below.

blog post

Shrinking vmdk disks in VMWare ESXi

I needed to move a VM from the Datastore onto my laptop today, and found that my VM had numerous vmname-001.vmdk / vmname-002.vmdk virtual disks. The size on these disks would mean it taking hours to move the VM from the VM server to my laptop – so I needed to tidy up and shrink if possible.

I first found that deleting any old or redundant snapshots (taken as a safety measure when updating items within my VM!) consolodated all the -001 / -002 / etc .vmkd files into one ‘master’ vmname.vmdk file. But this file was the full size of the allocated disk size – in my example 160Gb, but the VM was infact only using about 40Gb… time to shrink! Via SSH to the console, I ran the following (with the VM shutdown and powered off of course!).

Firstly – get yourself into the VM storage area for your VM :

cd /vmfs/volumes/vmstorename/vmname

Now run the VM Filesystem tools to shrink your .vmdk – this may take a while, in my case from 160Gb down to 36Gb took about 10 mins :

vmkfstools --punchzero vmname.vmdk

36Gb – Much easier to move around.

blog post

iOS 7 Beta – Download Links

So if like me you’ve scoured the web to download the latest iOS 7 Beta here’s some links for you :

Official developer links ( hosted) – you’ll need a developer account to download :

Publicly posted downloads :

 Note : I’m not hosting the files (can you imagine the server traffic) but simply linking elsewhere