David Goodwin’s blog

  • Linux console dimming / screen saver

    Our work server seems to enjoy crashing (at the moment) about once a day – but when I go to look at the console I can’t see anything because the screen has dimmed to black – and as the computer has locked up, I can’t wake the screen up to see if there is a…

  • Netbeans vs Vim … round 1 … fight

    So, I think I’ve changed ‘editor’. Perhaps this is a bit like an engineer changing their calculator or something. For the last 10 years, I’ve effectively only used ‘vim‘ for development of any PHP code I work on. I felt I was best served using something like vim – where the interface was uncluttered, everything…

  • irssi – crapbuster (cleaning up the irc window)

    Tired of seeing join/part/quits messages in your IRC window, and want a quick way to selectively get rid of it – then look no further – mkdir -p ~/.irssi/scripts cd ~/.irssi/scripts wget http://scripts.irssi.org/scripts/crapbuster.pl Then within IRSSI – /load crapbuster.pl /set crapbuster_levels JOINS PARTS QUITS NICKS CLIENTCRAP CRAP MODE TOPICS KICKS And then : /crapbuster Will…

  • MySQL table defragmentation (python script)

    I’ve written the below Python script to defragment MySQL database tables. This should work with both InnoDB and MyISAM table formats, and is just calling “OPTIMIZE TABLE blah.foo”. It rummages through the information_schema for tables which may be defragmented. You should be able to run it on any Debian based system without making any alterations.…

  • Chocolate headed pirates

    My son woke up at 6am crying quite loudly this morning – he’d been having a nightmare involving a Chocolate Headed Pirate being mean and nasty to him. Personally I think a chocolate headed pirate would be quite tasty – although perhaps it’d be a bit more than I could eat in one sitting (or…

  • Automated twitter compilation up to 29 March 2012

    Arbitrary tweets made by TheGingerDog (i.e. David Goodwin) up to 29 March 2012

  • Spring trip to Barcelona

    Spring trip to Barcelona

    Well, sort of random. As I don’t normally bother to upload any pictures and so on, I thought I might as well for once – and I said I’d send my father a postcard, but then failed to …. perhaps this will make up for it. I didn’t notice any postcard selling shops either – perhaps…

  • WTFs per minute

    I’m currently refactoring some legacy third party PHP code, and as the old saying goes, the real metric is WTFs per minute. So, just to entertain any readers, how about : Writing pagination links for a search form, but if there are more than 20 pages of results, add 20 onto whatever the maximum number…

  • A week of fire fighting (aka why you should <3 unit tests).

    I feel like I’ve spent most of this week debugging some PHP code, and writing unit tests for it. Thankfully I think this firefighting exercise is nearly over. Perhaps the alarm bells should have been going off a bit more in my head when it was implied that the code was being written in a…

  • Automated twitter compilation up to 24 January 2012

    Arbitrary tweets made by TheGingerDog (i.e. David Goodwin) up to 24 January 2012

Contact / Links etc