Archive for the ‘Life’ Category

View all CVS commits in past week

Tuesday, July 31st, 2012 | Life, Tech

This will give you a list of all the commits made between a specific date period. Just alter the dates accordingly.

cvs diff -N -c -D 2011-03-21 -D 2011-02-28 > /tmp/diff.txt

Writing to the Colonel

Sunday, July 29th, 2012 | Life

Having found an interesting note on KFC’s website, I decided to write to them.

Dear KFC,

I was recently browsing your website, when I found the following statement at the small print at the bottom of the page:

“Our research shows that UK customers don’t want genetically modified foods in KFC products; so naturally, we have ensured none of our products contain genetically modified ingredients.”

You seem to be pointing out that this is what we as consumers want, presumably rather than what is the sensible thing.

Therefore, I just wanted to write and let you know that I DO WANT genetically modified ingredients in KFC products.

Genetic modification is nothing new – we have been adapting plants to suit our needs in agriculture for thousands of years. Using GM crops allows us to reduce the amount of agricultural chemicals used, and is therefore be better for the environment. The EU maintains strict controls over GM foods to ensure they are safe.

For all these reasons, I wanted to inform you that some of your customers do want genetically modified ingredients in KFC products, and hope that you will re-consider your position.

Yours faithfully,
Chris Worfolk

Why not contact them about it too?

Decade in the Sun

Thursday, July 26th, 2012 | Life, Limited

History of Worfolk Online

Recently, I was thinking that it must be coming up to ten years since I registered my first domain name, in the next couple of years. When I actually checked, it was two months ago.

In May 2002, I first registered Worfolk.co.uk, now the home of my consultancy company. This was by no means my first venture into the world of web development, I had been developing websites for years before, and programming for years before that. But it’s difficult to put a precise date on any such projects, unlike 7 May, 2002.

Between then and now things have changed a lot – a one point, the Worfolk Online network contained hundreds of websites. It now contains only a few dozen, that are far more focused on quality. While I don’t have screenshots of all of them, the image above shows the evolution of some of the network’s homepages.

Anyway, cheers, here is to a wonderful decade and hopefully, an even better one to come.

Killing zombie processes

Wednesday, July 25th, 2012 | Life, Tech

Zombie processes are very hard to kill, like cave trolls, but there is a way. We need to get the parent IDs for them and use those.

ps -Al
kill <ppid>

Olympic torch celebration

Sunday, July 22nd, 2012 | Life

Last month, I went to Temple Newsam to see my mum perform at the Olympic torch celebration. The choir were fantastic, well done to everyone involved!

Getting in was a struggle. After the padding down and the cavity search you then have to have a long argument about whether the folding furniture you have brought counts as genuine folding furniture. No prizes for guessing who was sponsoring the event either…

Flood

Saturday, July 21st, 2012 | Life, Photos

All the heavy rain last month caused the River Aire to just about reach its banks.

Loserville

Friday, July 20th, 2012 | Distractions, Life

Last month, we went to see the new musical Loserville, at the West Yorkshire Playhouse. While the play itself was very entertaining, I have to say that I’m really not comfortable about them making a musical about my life without offering me any royalties, or even asking my permission.

Install APD on CentOS 5

Thursday, July 19th, 2012 | Life, Tech

Here is how to install APD (Advanced PHP Debugger) on CentOS 5. Lets start by creating a directory for it to log files to.

cd /tmp
mkdir apd
chown apache:apache apd

We need to remove ioncube, or it will cause errors.

rpm -e php-ioncube-loader

Now we can install APD, via PECL.

pecl install apd

Add the following to php.ini.

[apd]
zend_extension=/usr/lib64/php/modules/apd.so
apd.dumpdir=/tmp/apd
apd.statement_tracing=0

My PHP binary was in a different location, so I had to alter the script too.

cd /usr/bin/
vim pprofp

Change /usr/local/bin to /usr/bin and save the file.

You also need to ensure PEAR is in your include path (/usr/share/pear) for the script to work.

My kingdom for an internet connection

Monday, July 16th, 2012 | Life

It’s been over four months since we moved into our new apartment and we still don’t have our own internet connection.

Having originally placed our order with o2, they failed to turn up to install the phone line and then insisted that they had turned up, even though Norm was there, with his phone turned up and got neither a knock on the door nor a phone call, we cancelled with them and re-ordered with BT.

This meant waiting another four weeks for an appointment, but when the time came George managed to book a day of work to sort everything out. But BT never turned up.

I phoned them to ask what was happening. They said they would go away and investigate and phone me back. Five minutes later they did. They said that they didn’t have our address in their engineer’s database, so couldn’t turn up and had to wait 24 hours for the database to update before they could say when they could come.

That is one of the craziest things I have ever heard. But even if you find that credible, I then enquired why they hadn’t even notified us when they realised they couldn’t turn up. They said they had my number down incorrectly – this would be slightly more believable if it wasn’t for the case that they were telling me this after phoning me back! How exactly did they have my number down incorrectly if they’ve just called me on it?

They promised they would phone me back after 3pm the next day to arrange a new appointment.

At 2pm the next day, I got an email from our landlady asking if one of us could call her ASAP. I did, and she said a BT engineer was trying to get into our apartment. Obviously, having not been told he was coming, we weren’t home. I said it was OK to let him in, but by the time I had done that, he had already left.

I phoned BT to see what was going on, but having left me on hold for a few minutes to investigate they told me that the engineers’ reports don’t come in until 6pm so they didn’t know what was happening and promised they would ring me back the next day.

They didn’t phone me, so that afternoon I phoned them and had a long conversation about what was going on. By this point the issue was deemed so serious that I was transfered to someone based in the UK, who actually spoke fluent English.

He said that they simply couldn’t install a line if our address wasn’t in the Royal Mail database. So even though they had been to our property the day before to install the line, they couldn’t install the line because they didn’t believe that our property existed.

At this point, I decided on a new strategy. I told them that they had our address wrong. We actually lived in apartment 14 (actually, I tried 13 first but because of superstitious nonsense, there is no apartment 13), so they should install it to that property. I also explained that for unknown reasons apartment 14 would be labelled “303” on the door, even though it definitely was apartment 14. They updated their records and scheduled a new appointment in two weeks time.

The appointment arrived and the engineer turned up to install our line. After a frantic twenty minutes trying to find the housekeeper to let us into the comms room (we don’t have any contact details for her, so we have to phone the landlady, who phones the housekeeper), the engineer finally got access and began surveying the situation. It turned out the only way we could get it working was to use the existing network because the building had never given any consideration to people actually wanting a phone line (the alternative was to run a new line in, up the side of the building – that was my preference to avoid all this nonsense but it would inevitably incur other nonsense instead).

Ok, so we just need to work out how we’re plugged in at the moment. Easy enough? Not quite. The comms room has a series of 10 48-port switches, none of which had any labelling on. I’m sure you can do the maths but to be clear, that makes 480 ports, one of which was our apartment – but we had no idea which.

The engineer began investigating. With some further surprise restrictions now being enforced by the building management, we were now running into an extended appointment which the engineer said it would have to bill us extra for. We told him that if such a bill would be under £100 then we would pay it, otherwise he could get on his bike.

Luckily, the bill suddenly did come in at “under £100”, so by lunch time we had a phone line we were assured would soon be working. We had no phone to plug into it, so no way to verify said claim, but I’m sure BT wouldn’t let us down. Now just to order the actual internet…

Install memcached on CentOS 5

Friday, July 13th, 2012 | Life, Tech

First step, you’ll need to add the EPEL repository to Yum.

Once you’ve done that, you can install all the YUM packages.

yum -y install memcached.x86_64 libmemcache.x86_64 libmemcache-devel.x86_64 zlib-devel.x86_64

Then add the memcache extension to PHP.

pecl install memcache

Add the extension to your PHP configuration.

extension=memcache.so

Configure memcached appropriately.

vi /etc/sysconfig/memcached
add OPTIONS="-l 127.0.0.1"

Configure it as a service, and start.

chkconfig memcached on
service memcached start