Installing htop on a CentOS WHM/Cpanel Server

Mostly just posting this for my own reference, but you may find it handy. If you want to install ‘htop’ (a very good Linux process viewer) onto a server running CentOS (in my case also running WHM and cPanel), you may run into some errors. Firstly, you need to make sure you have the DAG […]

Updating Large Datasets in MySQL

I’ve been building a PHP script to import an XML file every 24 hours into a MySQL database using a CRON job. The table contains almost 150,000 rows of data, each with a unique ID (primary key). The goal is to check if each ID exists. If so, update the record, otherwise insert it as […]

Goodbye Stargate

I’m dreading tomorrow night…it could be the last time I ever get to watch a new episode of Stargate. It’s the final SGU episode, and it looks like there may not be any new series or any more SG-1 or Atlantis movies. And so ends a chapter of my life that started 14 years ago. […]

The new “Press Enter to Submit” Facebook Comments System

Today Facebook rolled out a change to their comments system. The “Submit” button is now missing, and pressing the “Enter” key no longer adds a new line, it submits the comment. The obvious downside to this is that comments will be posted incomplete, when users are trying to add paragraphs but accidentally submit the comment. […]

How to Add Up/Down Swipe Functionality to Sencha Touch

Whilst working with the Sencha Touch mobile JS framework, I was disappointed to find that it only handles left/right swiping. The application I’m working on requires swiping up/down/left/right to navigate, so I needed to add this functionality to the code. It was simple enough to hack the Sencha Touch JS file, but this would have […]

How to send mail from a Google Apps Group/List

If you use Google Apps for your domain, sometimes you have a “group” setup, such as Mail sent to is then forwarded to the members of the group, such as The problem is that when you want to send an email from the info account, Gmail adds the “Sender” header which makes […]

How to Remove Font Styles in TinyMCE

I use TinyMCE Editor on several of my projects, and I regularly have a problem with my users pasting content from Microsoft Word etc. This means that I usually end up with multiple ugly font styles on the page that don’t match. There is a relatively undocumented feature in TinyMCE called “valid_styles”. This will prevent […]

How to add an “Invite” tab to a Facebook Page

I was asked today how to add a tab to a Facebook Page to allow your fans to suggest the page to their friends. Here’s the code: <fb:request-form method=”GET” type=”YOUR PAGE” invite=”true” content=”DESCRIBE YOUR PAGE”> <fb:req-choice url=”” label=”Check out!” /> <fb:multi-friend-selector actiontext=”Tell your friends about YOUR PAGE” rows=”5″ cols=”3″ showborder=”false” /> </fb:request-form> Obviously you’ll need […]

Why I’m ditching vBulletin for IP.Board

My website Blues Brothers Central has had a forum since early 2004. Initially I wrote my own basic forum, but it became clearly soon afterwards that it needed something more powerful. For a while I used phpBB2, but after a year or two even that wasn’t good enough. The lack of features and regular security […]

PHP Variable Preparation Function for MySQL

This is a handy PHP function I wrote to prepare values for insertion into a MySQL database. For example, if you prefer to use arrays of data and have a function automatically join them together: It can make life much easier as you don’t need to manually write all your SQL queries and list every […]

ajax web apps developers . Leg Foot . mold remediation jupiter
Powered by WordPress