David Goodwin’s blog

  • Running along….

    I think I’m back into my running ‘habit’ again, after finally overcoming an achilles tendon and so on. I randomly installed RunKeeper on my iPhone, and I seem to be running at about 4minutes 30seconds per kilometer (I did 9.6km at this pace). The furthest I’ve been recently is about 13-14 miles, I think… So,…

  • Automated twitter compilation up to 25 May 2011

    Arbitrary tweets made by TheGingerDog (i.e. David Goodwin) up to 25 May 2011

  • PostgreSQL Backup script (python)

    Perhaps the following will be of use to others. In a nutshell, it’s a python script which backs up a provided list of PostgreSQL databases. I’ve written it for Windows, but it should work on Linux too (just change the paths in the BACKUP_DIR and dumper variables. No doubt it could be changed to query…

  • Dog boarding ….

    Dogboarding from DANIELS on Vimeo.

  • yum changelog (Want to know what you’re about to upgrade on CentOS/RHEL?)

    Want to see what changes you’re about to apply when doing a ‘yum update’ ? Similar-ish to how ‘apt-listchanges’ works… On CentOS 5.6, try : yum install yum-changelog python-dateutil Note, python-dateutil seems to be an unmarked dependency – i.e. you get an error message like : “Dateutil module not available, so can’t parse dates” when…

  • Useful settings for history recording in bash (/etc/profile or ~/.bashrc)

    shopt -s histappend shopt -s checkwinsize export HISTCONTROL=ignoredups:ignorespace export HISTTIMEFORMAT=’%Y-%m-%d %H:%M:%S  ‘ export EDITOR=vim histappend: don’t overwrite .bash_history files on each logout; then when someone logs into the server, and messes something up, there’s a vague chance you’ll see what they did. Your history file will obviously grow to be quite big – but suppression…

  • Random MySQL performance tuning stuff

    If you’re using InnoDB, ensure innodb_buffer_pool_size is set to a decent value – I choose about 25% of physical memory… ideally this is larger than your dataset size, but obviously may not be posible, and the server may have to do other stuff…. If you’re using InnoDB stop the O/S from also trying to cache…

  • Magento not finding product images (solution)

    I migrated a Magento instance from one host to another, and in the process earnt myself some free beer; everything went well, apart from some of the thumbnail images not appearing. The image URLs would look like : /media/catalog/product/cache/1/image/5e06319eda06f020e43594a9c230972d/images/catalog/product/placeholder/image.jpg Things tried which didn’t help : rebuilding various Magento image caches and so on (login as…

  • Getting a kvm serial console with grub2

    I’ve a few kvm guest servers, which I’ve been accessing using vnc – but this is a bit of a pain (getting port forwarding setup etc). Host and guests run Debian Squeeze with Grub2 installed/in use. So, here’s how to do the ‘virsh console ‘ thing … Edit /etc/default/grub, specify GRUB_TERMINAL=console GRUB_SERIAL_COMMAND=”serial –unit=0 –speed=115200 –word=8…

  • fsck -y (or fsck yes…)

    Tip for the day: Edit /etc/default/rcS on Debian/Ubuntu servers, and set FSCKFIX=yes (default of no) so next time your server runs fsck at startup, and spends hours doing it to only moan when it finds an error, and tells you to waste more time by running fsck with ‘-y’ (to fix it). Quite why fsck…

Contact / Links etc