On a recent project we needed to provide a client our contribution to the site code base as static .html files. To make the development process easier though a number of the developers wanted to include some of the global page assets such as the header and footer using PHP…
Read MoreMirroring a website with wget
Clueless clients and bad briefs can make a developers life very difficult at times so sometimes it comes in handy to be able to replicate a site in its entirety to review. Rsync could be used to mirror the files to a local location but it doesn’t really fit this…
Read MorePHP CGI 504 Gateway Timed Out Errors With Nginx
Recently I noticed that the nginx error log for a site I was working with was filling up with timeout messages similar to below: 2012/07/06 17:21:01 [error] 23897#0: *8870 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 173.25.1.129, server: project.com, request: “GET /jobs/update HTTP/1.0”,…
Read MoreRaspberry Pi Overclocking
Like just like alot of other people as soon as the Model B Raspberry Pi went on sale in March I eagerly rushed out and ordered one from Element 14. Due to production delays this didn’t arrive till the start of June. But given its size, specs and price I…
Read MoreWatching the progress of a dd action
dd is one of those indispensable Unix / Linux utilities whether its cloning or wiping a drive or simply creating a bootable flash drive from an image file. The problem is operations like wiping a drive with the output from /dev/zero can take an extremely long time especially on larger…
Read MoreQuick Recursive Code Count
Although the “lines of code” in a project is not the worlds most useful metric. Curiosity sometimes gets the better of us and after many days / weeks of typing you think “gee I wonder exactly how many lines of code are in that project?”. Wonder no more! By embracing…
Read MoreReplace The Default Firefox Google Search In Linux Mint
The recent release of Ubuntu’s Natty Narwhal forced me to reassess my usage of Ubuntu on my work and home machines. As I found the Unity interface drives me crazy and the release on a whole to be very buggy. So I decided to give Linux Mint a go, it…
Read MoreAnonymizing CURL Scripts With TOR & Polipo
Last week I received a typical run of the mill phishing email littered with the usual bad Engrish making the instructions far from believable but being bored I decided to take a look at the link they were pushing. They had created a believable enough looking Paypal form asking clueless…
Read MoreNear Realtime File Replication With Lsyncd
Ever wanted real time backups of directories on your server? To replicate static media files for a website to a separate box to reduce load? An easy solution lays with lsyncd it allows you to watch a directory structure on your file system, and replicate any changes on a remote…
Read MoreTracking Bandwidth Usage With vnStat
Outside of internal networks bandwidth is paid often for by the gigabyte and as such it becomes important to be able to see the bandwidth consumption of machines and plan future quotas accordingly as usage grows. There are plenty of packages available that fill this void like darkstat, ntop etc,…
Read More