Darren Beale Web developer, retailer & photographer


Tip: keep Vagrant guest additions up to date


I found a handy plugin this weekend for keeping my PHP development Vagrant VM VirtualBox guest additions in sync: vagrant-vbguest `vagrant plugin install vagrant-vbguest` Every time you do a `vagrant up` it’ll do a check, which might occasionally get annoying if you’re in a hurry, so there’s a config option to disable it on a per-vm basis: `# set auto_update to false, if you do...

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

Phonegap Android development environment for Windows


Assuming you want to develop HTML5 apps to run on mobile devices using Phonegap/Cordova then the easiest place to start is Android if you’re a Windows user as you don’t need a separate Mac, you don’t even need a device to test on as there’s an emulator.
Anyway, I’ve had to do this three times on various machines now, so here’s a step by step guide for next time!

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.

MySQL one-liner to obfuscate live user details


Problem: you need to get someone else to set up your web application on another server. Even with a signed NDA it’s not really a good idea to be sending over MySQL dumps containing real people’s details and it is almost certainly against data protection rules. If so, and you need to do it right now, then this’ll do you nicely as a quick & dirty hack. Clearly, if you had some...

Scarlett’s Energy Saving Mission


My youngest (5) came home from school this week with some homework relating to her school’s theme of educating the kids on ways to save energy. The premise was to involve the entire family in looking at devices that are left switched on in the home that might be power hungry. I jumped on this and may have got ever-so-slightly carried away. My Scarlett’s homework follows:...

Woodland for sale


Ever since I visited Ben Law and spent a week learning in some detail how he built his amazing house from trees in his woodland I have dreamt of doing something similar. So much so that when it became available we scraped up the money and bought a 4 acre plantation of slow-grown, straight and tall Japanese Larch that was perfect as a building material. A year later we found a suitable building...

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

Darren Beale Web developer, retailer & photographer