Darren Beale Web developer


Halt all Vagrant/VirtualBox VMs one-liner


If you’re using Vagrant to control your dev VMs on a headless server it’s easy to lose track of the number of running machines.
Here’s a one-liner to gracefully shut-down all of them to free up some resources.
for VM in `VBoxManage list runningvms | awk ‘{ print $2; }’`; do VBoxManage controlvm $VM poweroff; done

Default changes to Vim


Quick post for future reference.
Just installed Debian or Ubuntu, need Vim back to what you’re used to?
edit `/etc/vim/vimrc`
`set background=dark`
`set autoindent
set expandtab
set softtabstop=2
set shiftwidth=2`
Tabs are now always (2) spaces and you can actually see the text.
Don’t forget to add `export EDITOR=vim` to .bashrc either.

Building a PHP development server from scratch


The other day my dev server completely died, this was rather inconvenient to say the least. 24 hrs later and my new (excellent, very quiet, powerful but only consuming 150w) HP 54L Proliant Microserver was sitting on my desk ready for building. I’ve done a server build so often that I can do it with my eyes closed , but usually miss something, so as I was in a hurry I referred to my...

UK Smart Meter Data Access and Privacy without the hype


There’s been a fair bit of press recently on the privacy issues surrounding the UK’s smart meter roll-out – currently in its foundation stage (figuring out how it’s actually going to work) before the official start of the roll out in 2014 – some of it is balanced, some of it less so. The coverage all seems to reference just a handful of reports here, here and here...

‘svn add’ one-liner


Simple one-liner that I use when I’ve loads
of files to add to a subversion repository:
for FILETOADD in `svn stat | awk '{ print $2 }'`; do svn add $FILETOADD; done

Installing bitcoin on Debian ‘squeeze’


Instead of being outdoors I geeked out indoors this weekend and amongst other things installed a Bitcoin daemon on a public facing server so I could have a play with the API/RPC features.
Below I document the steps I followed as it turned out to be slightly more taxing than the usual apt-get install bitcoind

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...

Darren Beale Web developer