How to use Mustache with JS / jQuery – a working example
I’ve been evaluating Mustache as a Javascript templating engine because my manager didn’t like the look of my jQuery code with lots of concatenation of HTML with javascript variables. The Mustache documentation doesn’t give working Javascript / jQuery examples so once I got this working it seemed only right to share it with you all (and hopefully drive a bit more traffic to my blog).
[Read more →]
October 29, 2011 No Comments
PHP command line reports no errors
Problem:
Even after checking all normal error display directives you still can’t get any errors to display on the command line when running a PHP CLI script.
[Read more →]
August 1, 2011 No Comments
Migrate a MySQL database to another Linux server using the command line
Problem:
I have a MySQL database on one server and I need to move it to another one but don’t have access to any GUI client that will make it possible to drag & drop (eg Navicat)
[Read more →]
June 7, 2011 No Comments
Fix the display problem when running Gnome Desktop on a Centos 5 VM in Microsoft Virtual PC
Symptom:
When launching Gnome desktop on a virtual machine running inside Microsoft Virtual PC, the display is corrupted making it impossible to work with.
[Read more →]
April 21, 2011 No Comments
Shell command to set permissions for Joomla 1.5 development
The default installation of Joomla 1.5 is fully locked down to make it as secure as possible in its inital installed form.
This is great from a server security viewpoint but doesn’t make developing a new site very easy since even basic things like uploading extensions can fail due to this secure configuration.
December 17, 2010 No Comments
How to install a JoomFish translation for JEvents
Assuming that you already have both the JoomFish and JEvents components installed, do the following to ensure that JEvents displays all elements such as buttons and labels with their correct translations when using JoomFish to control the frontend language of your site.
December 13, 2010 No Comments
CKEditor Tutorial: Adding a ‘Link to local page from site’ field
CKeditor is a great piece of work, not least because it’s free to use by anyone who wants to integrate it into their project. Myself, I am using it for a web content management system that I am developing and it’s definitely the best javascript WYSIWYG editor I’ve yet to come across, especially since it provides a comprehensive and well documented API framework.
[Read more →]
November 24, 2010 13 Comments
Creating a large storage volume on a Linux VM running on an ESXi host
I have an ESXi host in my office with a RAiD10 array that has around 925GB in capacity – 95% unused. I have a couple of VMs on it that hardly use any of that space and I wanted to make use of all the spare storage space to make a backup of our family photos which were previously stored on two 500GB external drives and take up over 700GB. That’s quite a lot isn’t it? … you might say. Well, I agree, but my wife is rather trigger happy and loves to take 10 slightly different versions of the same shot so that she can choose the best one…. unfortunately the choosing of the best ones rarely involves deleting more than 1 out of each 10 of what was taken, hence the monstrously large library. Ah well!
[Read more →]
November 17, 2010 No Comments
How to move only the oldest files out of a directory leaving the new ones
I had a log directory with over 15000 entries from a period of over two years. My task was to move all but the most recent logs into a subfolder. I achieved this using the find command like so:
[Read more →]
November 14, 2010 No Comments
Using bash aliases as shortcuts to common tasks
I wish I’d discovered this about three years ago when I first started learning the bash command line – it would have saved a lot of remembering paths and typing them.
[Read more →]
November 12, 2010 No Comments