Monday 23 June 2008

Pixel Lapse

I recently came across this small application called pixel-lapse. The basic principle sounds interesting: record a webcam image one pixel at a time. From the photo gallery on the web site, it looks like you get the most interesting results when part of the image is static and part of it moves. So I decided to give it a go and here's the first shot:

Pixel Lapse image

Working at the computer

Interesting result indeed! Shame about the watermark though. I'd happily pay a few quid for a version without the watermark but it doesn't seem to be an option on the web site.

Thursday 19 June 2008

Web Sharing and PHP on Mac OS-X Leopard

Mac OS-X comes with a version the Apache web server that is configured to allow users of the system to publish their own web pages directly from the Sites directory in their home folder. This is of limited use for the average user but is just great for web developers who can test their work directly, using a real web server. However, there is a glitch: if you upgrade from OS-X Tiger (10.4) to Leopard (10.5), existing users will suddenly get an HTTP error 403 Forbidden when navigating to their web pages. This is because in Leopard, Apache's security is tightened by default.

Apple provide an article that describes how to re-enable access for those users. However, their version will still deny access to sub-directories. So I slightly adapted the shortname.conf file to make it more flexible. Here is my version:

<Directory "/Users/shortname/Sites/*">
Options Indexes MultiViews
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>

The star (*) at the end of the directory name on the first line ensures that the rule applies not only to the ~/Sites directory but also all sub-directories. The FileInfo value for the AllowOverride option on the third line tells Apache to allow settings override in a .htaccess file in that directory or any sub-directory thus allowing much finer grained control.

After getting this to work, it appears that, although PHP5 is installed, it is not enabled in Leopard's Apache installation. Enabling it is very easy and very well explained at Foundation PHP.

There you go: a full blown web server with PHP support is just what you need to locally test drive you beautiful web creations and you don't even have to install any extra software.

Friday 13 June 2008

Montignac, 12 days on

At the beginning of last week, I decided to follow the Montignac method to try and lose my beer belly. I lost just over 1kg in the first week but realised that, as I was buying my lunch from shops surrounding the office, I had no way to know the exact list of ingredients that went into my food and therefore no way to check that I was really following the method. So I decided to sort out my own pack lunch to make sure I knew exactly what I was eating. This meant doing more comprehensive and careful food shopping at the weekend, which was a bit of a pain but hopefully it would be worth it. As a result, I lost another 200grams on the first day but regained them over the next few days. I finish the week today the same weight as I started it: 87.3kg. That's not very promising and quite frustrating. I'll keep trying for a few more weeks just in case my body needs a bit more time to adapt. After that, if it stays the same, I'll just go buy an ice cream and dump my Montignac books in the (recycling) bin.

Monday 2 June 2008

Getting Rid of the Beer Belly

Since I moved to the UK, I've been steadily acquiring a beer belly. Even without my mum telling me so (which she does every time she sees me), I've wanted to lose it for some time. Now the problem is that I've never been keen on weight loss diets because most of them are just unsustainable in the long term as they require you to give up entire food groups. But lo and behold, I was recently introduced to the Montignac method and I like his approach. I mean, someone who includes unpasteurised cheese, foie gras, dark chocolate and wine in a weight control diet (note: weight control, not crash weight loss) has to be a genius!

The whole concept behind this diet is the Glycemic Index of food ingredients. So, yes it is related to the Atkins and GI diets but is done is a way that seems more sensible to me. And, as Michel Montignac is French, he bases everything on eating good food and enjoying it which makes it that much easier to follow. Having said that, I will probably not be all plain sailing: I'm not sure how difficult it will be to cut down on stuff like beer, potatoes and bread. On the other hand, it will get me to cook more and experiment with food, which can only be a good thing.

To follow progress, I'll try to weigh myself every day. The starting position today was 88.4kg, for a BMI of 27.6, which is squarely in the 25–30 Overweight bracket.

Stay tuned to see if I can get myself into shape!

Obviously, this post is completely unrelated to the previous one.

In The Beginning

I received this story by email from a friend and it made me laugh out loud so I thought I had to share it. Enjoy!

In the beginning God covered the earth with broccoli, cauliflower and spinach, with green, yellow and red vegetables of all kinds so Man and Woman would live long and healthy lives.

Then using God's bountiful gifts, Satan created Dairy Ice Cream and Magnums. And Satan said: You want hot fudge with that? And Man said: Yes! And Woman said: I'll have one too with chocolate chips. And lo they gained 10 pounds.

And God created the healthy yoghurt that woman might keep the figure that man found so fair.

And Satan brought forth white flour from the wheat and sugar from the cane and combined them. And Woman went from size 12 to size 14.

So God said: Try my fresh green salad. And Satan presented Blue Cheese dressing and garlic croutons on the side. And Man and Woman unfastened their belts following the repast.

God then said I have sent you healthy vegetables and olive oil in which to cook them.

And Satan brought forth deep fried coconut king prawns, butter-dipped lobster chunks and chicken fried steak, so big it needed its own platter, and Man's cholesterol went through the roof.

Then God brought forth the potato: naturally low in fat and brimming with potassium and good nutrition.

Then Satan peeled off the healthy skin and sliced the starchy centre into chips and deep-fried them in animal fats adding copious quantities of salt. And Man put on more pounds.

God then brought forth running shoes so that his Children might lose those extra pounds.

And Satan came forth with a cable TV with remote control so Man would not have to toil changing the channels. And Man and Woman laughed and cried before the flickering light and started wearing stretch jogging suits.

Then God gave lean beef so that Man might consume fewer calories and still satisfy his appetite.

And Satan created McDonald's and the 99p double cheeseburger. Then Satan said You want fries with that? and Man replied: Yes, and super size 'em. And Satan said: It is good. And Man and Woman went into cardiac arrest.

God sighed... and created quadruple by-pass surgery.

And then... Satan chuckled and created the NHS.

For those who don't live in the UK, the NHS is the National Health Service and the subject of many a joke and disaster stories.