kieranbarnes Independent PHP, WordPress & CubeCart Programmer

I hate vi. (aka Changing your default crontab editor)

Posted on May 7, 2008

I'm trekking into the unknown - CentOS, but thats off topic. For some reason, even the latest version stuck in 1982 - vi as the default editor for cron etc. Argh! I hate vi!

Find text within files

Posted on May 1, 2008

Stuck trying to find text within files on Linux?

cd /directory_tree_you_want_to_search
find . -type f -exec grep -l "string to find" {} \; -print

Easy!

Tagged as: 2 Comments

.htaccess redirect based on requested domain

Posted on April 28, 2008

Imagine you have a selection of domain names that point to the same site, are some of those domains specific to certain areas of your site?

Here's how I redirect a domain name to a specific area on a site

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?cubecartexperts\.co.uk
Rewriterule ^(.*)$ http://www.i9000networks.com/landing-page/cubecart-experts/ [L]

You'll also need the domain set in your virtualhost config like this

ServerName www.i9000networks.com
ServerAlias www.cubecartexperts.co.uk
ServerAlias cubecartexperts.co.uk

It is a much more helpful way of helping your users navigate your site.

Tagged as: No Comments

Using rsync to maintain backups on Linux

Posted on April 22, 2008

Following on from my previous article, regarding Setting up and using NFS on Ubuntu, here's how I keep backups for quite a few clients.

On a particular site I maintain a single backup server that several clients backup to on a nightly basis.

Redirecting WordPress index.php to root

Posted on April 20, 2008

If you check the Page Rank of http://bloke.org against http://bloke.org/index.php, which are both, to a human, obviously the same page you'll see two different results. My domain carries a PR3 whilst the latter carries a PR0.

We know they are both the same, but do the crawlers? No, they don't.

Setting up and using NFS on Ubuntu

Posted on April 10, 2008

Network File System, NFS, has been around since Noah first networked his ark.

Setting up and using NFS on Ubuntu is surprisingly easy. i9000 Networks needed a slightly revised backup solution in one of it's sites.

Obviously you'll need two or more servers. One I'll refer to as the server which will host the backups and the second/subsequent servers, which are the clients, ie. the live servers that need backing up.

Here's how I did it.

Auto Updating GeoIP Binary Databases

Posted on January 14, 2008

Here's how I keep on top of updating the GeoIP binary databases used by various scripts and applications I use.

Filed under: Linux, PHP Continue reading

Installing VMware Server & MUI on Ubuntu 7.10

Posted on November 15, 2007

Installing VMware on Ubuntu 7.10 isn't as easy as Ubuntu usually makes things out to be. None the less, my handy how to will sort you out.

FuzzyOCR inspired PDF scanning for SpamAssassin

Posted on October 16, 2007

I've just stumbled over a PDF scanning engine for SpamAssassin. In light of the recent PDF spam making it's way round the internet I figured I'd give it a try.

This plug in scans the PDF pdf body and embedded images. Great, huh?

Here's how I did it.

Tagged as: Continue reading

FuzzyOCR for SpamAssassin on Ubuntu

Posted on October 10, 2007

FuzzyOCR is a plugin for SpamAssassin that analyzes the content and properties of images to distinguish between normal mail and spam.

I've been running it on some mail servers for a few months now and I'm very happy with the results.

Page 6 of 8« First...45678