Month: December 2007

  • MySQL replication

    More brain dumping, this time after setting up MySQL on my test server to replicate offsite as the data on there is becoming important. Both machines are running fully updated and upgraded Debian Etch and MySQL 5 as a Debian package with identical copies of the MySQL databases in /var/lib/mysql/. On the master I: I…

  • Search and replace multiple files with sed

    Ok, if you ‘do’ Linux, then you’ll probably already know this one. I did, kind of, but had to Google to remind myself of the exact chain of commands. So here I am writing it down so it’s easier to find next time. In my case, I had a load of Apache conf files where…

  • Moving multiple subversion repositories

    I needed to migrate all of our subversion repositories from an overworked machine onto a new dedicated machine. As I had about 30 repositories to copy over, I didn’t fancy doing each dump -> copy -> create -> import manually, so I came up with the following. Which, amazingly, worked the first time. I’d say…

  • A Blank WordPress Theme

    I’ve just uploaded a blank WordPress theme called Naked that I built to assist those (like myself in the past) who have a need to quickly roll-out a WordPress theme with a custom look and feel but may not necessarily have the time to start from scratch. It is purposely very simple and basic, but…

  • Removing DOS linebreaks from your files using Vim

    This morning I’m debugging an issue on a script that gets cronned every minute. I’ve a shell open on the server and the file in question open using Vim and I notice each line has a trailing ^M…. Aargh the dreaded DOS linebreak. Dusting off my rusty vim-foo I simply do a search and replace…