David Goodwin’s blog

  • Facebook likes….

    The BBC has this article today about the value of “facebook likes’ – see http://www.bbc.co.uk/news/technology-18813237 I’m not overly surprised, as : I’ve been getting a number of spam emails with “Buy 1000 likes for $49” or whatever, so no doubt there are people being paid to click ‘like’ in the same way as there are…

  • rsyslog selective logging with multiple postfix instances

    Scenario – one Linux box runs multiple Postfix instances. By default they all log to /var/log/mail.log which makes it difficult to see what’s going on without using grep and so on. The server already uses rsyslog, and Postfix is configured to specify a syslog_name to each instance. i.e /etc/postfix-blah/main.cf contains “syslog_name = postfix-blah” rsyslog allows…

  • Fixing REMOTE_ADDR when behind a proxy/varnish server

    I had an annoyance where varnish proxy infront of a LAMP server and the LAMP server therefore thought all clients were from the varnish proxy – rather than the client’s real IP address – i.e. $_SERVER[‘REMOTE_ADDR’] was set to the IP address of the Varnish proxy and not that of the client’s actual IP address.…

  • Automated twitter compilation up to 16 June 2012

    Arbitrary tweets made by TheGingerDog (i.e. David Goodwin) up to 16 June 2012

  • fsck paranoid?

    Some random hints : Ensure the final field / column in /etc/fstab is non-zero for other filesystems you have mounted; if it’s 0 then fsck will never run on them. fsck -Cccy /dev/blah1 does a read-write (non-destructive test). Works well on SSDs 🙂 Example from /etc/fstab: /dev/md0  /mount/point ext3 defaults 0 2 When looking at…

  • Sponge – Shell command

    Today, my sed kung-foo seemed to be lacking, so I ended up having to split the sed command over a zillion lines… Normally I’d do something like : sed ‘s/foo/bar/g’ tmp.txt > tmp2.txt sed ‘s/fo2/blah/g’ tmp2.txt > tmp3.txt But this obviously gets painful after a time, a different approach would be to use sponge where…

  • Automated twitter compilation up to 01 June 2012

    Arbitrary tweets made by TheGingerDog (i.e. David Goodwin) up to 01 June 2012

  • SSL Commands

    I keep forgetting these one line OpenSSL commands – perhaps if they are here, I’ll remember — Create private key file : openssl genrsa -out server.key 2048 Create certificate signing request (to send to e.g. GoDaddy) – openssl req -new -key server.key -out server.csr  Verify a certificate – openssl verify file.name To convert a .crt…

  • Automated twitter compilation up to 01 May 2012

    Arbitrary tweets made by TheGingerDog (i.e. David Goodwin) up to 01 May 2012

  • Checking PHP code for compatibility issues

    One project I occassionally hack on is Xerte Toolkits. Yesterday on the mailing list it came up that someone was trying to use XOT with PHP4. After getting over some initial shock that people still use PHP4 (it was end-of-lifed in August 2008) I wondered how easy it would be to check the status of…

Contact / Links etc