Darren Beale Web developer & early adopter


Debugging with PhpED and DBG


As long-term PhpED user I’ve always been well aware that I was not making the most of some of the more powerful features of my IDE, particularly the debugging capabilities. Well this week I finally got debugging set-up properly and as per most of my other blog posts I’m listing what I did here for future reference and just in case it helps anyone else.

Multiple project Trac set-up


I’ve already installed Trac and I now want to be able to set-up multiple projects with the minimum of fuss. My requirements are: Not having to mess with the Apache configuration every time I add a new project because I don’t want to have to restart apache Make some simple modifications to the stanadard trac.ini so that, for example, the logo at the top links to the home of that trac...

Vim auto indenting


I used to get annoyed when pasting text into a Vim window as each line would indent one more tab than the last line. To fix it I used to add set noautoindent in /etc/vimrc, however this unsurprisingly turns off auto indenting, which is a useful feature for normal typing. Today I came up with a definitive solution to this by setting a key binding for ‘pastetoggle’. Now in vimrc is the...

Subversion over ssh


My background task over the Christmas holidays was to ensure that I had the ability to give read/write access to a subversion repository situated on a machine within our corporate network so that staff or external contractors can access it via the interweb but without me needing to open up additional ports on our firewall. The server running Debian ‘etch’ is sitting within our DMZ and...

Installing Trac on Debian etch


The following is a no-frills install guide for getting Trac up and running on a Debian ‘etch’ Linux system. The assumption is that you’ve already got mysql and subversion working and have created a subversion repository (tip: apt-get install mysql-server subversion). The first thing that we need to do is install Python, easy_install and the mysql & python bindings: apt-get...

Search and replace multiple files with sed


Ok, if you ‘do’ linux then you’ll probably already know this one. I did, kinda, 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 I needed to replace each occurence of an IP address with an asterisk. A combo of find and sed worked well: find...

Moving multiple subversion repositories


I had a need 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 first time. I’d say a total of an hour elapsed from sitting down to start the job to being...

Move multiple subversion repositories


Need to move multiple subversion repositories?
Well I just finished putting a simple how-to together which details the steps I took when moving our 30+ svn projects from one server to another.
It went really smoothly and took about a quarter of the time I was expecting it to.
Anyway, here it is.

Creating a subversion repository
Automating subversion repository creation

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 I’ve put some effort into making it self explanatory and for anyone with experience of...

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 using Vim without having to exit the file. The command is: :%s/^M//g Job done, well...

Darren Beale Web developer & early adopter