Crazy road in China

November 6, 2006
1 comment Misc. links

Crazy road in China Here are some amazing images of a less than safe road somewhere in China. I get an uncomfortable feeling in my stomage of just watching these but still deep inside I really want to go there and experience it myself. ...if my mom would let me, that is.

I know that they've got some similar roads in Spain but I can't remember where so I can't dig up any pictures.

Memory dump blog recovery

November 1, 2006
4 comments Linux

My Firefox froze in one of the tabs when in another tab I had a long Fry-IT intranet blog half finished. To avoid having to rewrite the whole text again Jan showed me how to dump the RAM memory onto disk which I could then look through with standard tools. For this to work you have plenty of diskspace since the dump file is about 1Gb big:


$ sudo su -
# df -h
# cat /proc/kcore > /usr/kcore.dump
# strings /usr/kcore.dump > /usr/kcore.strings
# ls -lh | grep kcore
-rw-r--r--   1 root    root    1016M 2006-10-30 10:18 kcore.dump
-rw-r--r--   1 root    root      74M 2006-10-30 10:19 kcore.strings
# less kcore.strings | grep 'Bla bla bla'

Was this the most boring blog item I've written in a long time? Maybe, but it's good to have it noted the next time Firefox crashes.

Oxfordtube's website sucks

October 30, 2006
2 comments

Today I travelled on the Oxfordtube which is a coach service from central London to Oxford. It takes about 100 minutes and the busses are quite comfortable. On the saturday night before this morning's ride I bought a ticket online to save myself some time I thought. Turns out that even that I didn't know or notice it, I had bought a ticket for the 10:01 service from Victoria so my ticket was invalid as I boarded the 08:05 service. Thus, I had to buy another ticket or wait on by the bus stop till 10.01!

The crazy thing is, that nowhere does it say "10:01" when you buy the ticket!! Absolutely nowhere!

Another annoying thing is that the ticket you get when you buy online is a weird email with the subject line "CARD Transaction". It tells you on the website to print this page out, but since I don't have a printer at home I had to write down the Merchants ID and the Transaction ID and show these long numbers to the bus driver, who I should add, was a very polite and nice man. This is what the CARD Transaction email looked like

Truncated! Read the rest by clicking the link below.

Sending HTML emails in Zope

October 26, 2006
3 comments Zope

Here are a few lessons learnt when sending HTML emails in Zope with unicode data. I'm still a beginner with this stuff and still probably have a lot to learn. What I've achived now works but might break with different encodings or on different systems so don't assume that these patterns will work in your setup.

To the send the email I'm using the default MailHost that comes with Zope 2.8.5. I call it's send() passing the subject line a second time because the subject line is already in the body string.

The most valuable piece of magic to learn and remember from this is that when you construct the multi-part message you have to attach the plain text before the html text. Thank you Lukasz Lakomy for that tip!

Truncated! Read the rest by clicking the link below.

Catching a carriage return in bash

October 23, 2006
2 comments Linux

I'm not a bash expert. Now I need some help with some bash syntax.

I copied a function called get_key which takes a 1 character length string from the stty input and assigns it to a variable. It's nifty because I can prompt something like this:


Select task:
1 - Task XYZ
2 - Task F19
3 - Task 123
q - quit

Truncated! Read the rest by clicking the link below.

New domain name

October 20, 2006
0 comments This site

peterbe.mobi I've recently registered now set up a new domain name for this website. It's peterbe.mobi and is there to the be mobile version of the pages.

I've also made some of these slight improvements to the css for mobile and removed the category images on the blog items. There is so much more that I can do but I just haven't had time. For example, there's no search on the mobile version.

The screenshot here to the right is from a Firefox extension I have called "Small Screen Rendering" which is useful if you want to get a guessimate look of how your page might appear in browser with a very small screen. Immediate conclusion: there's a hell of a lot of scrolling :)

Ricardo Semler in London

October 18, 2006
0 comments Misc. links

Ricardo Semler in London Ricardo Semler is in London for the Leaders In London conference I would love to go the £2,500 (USD 4,649) for the 2-day conference package :( That's not the worst part. The worst part is that the leadersinlondon.com website.

It looks like one of those Get-Rich-Now-Quick-scheme site with faked testimonials and big bold red letters that you sometimes accidentally land on when you by accident click an ad link. leadersinlondon.com starts with an intrusive popup ad that you have to close to be able to read the content behind it. I would link to the page with the prices but it's a popup without scrollbars.

Truncated! Read the rest by clicking the link below.

Lion + Tiger = Liger

October 15, 2006
13 comments Misc. links

Lion + Tiger = Liger A Liger is a male lion crossed with a female tiger. They become really huge here are some impressive pictures. I can't even remember how I found this page but it was an interesting little read.

"People often ask what our big cats eat. They love to eat something called, King Lion diet, which is made basically by taking a horse, a cow, a couple of pigs and a flock of chickens and putting them into a blender on high with all they parts and pieces. This ends up looking like a raw bloody meatloaf."

Read the page about Ligers

NES Quiz

October 13, 2006
0 comments Misc. links

NES Quiz Think you remember a few games from the good old NES days. I did. I was wrong.

I recognized a lot of the images and the covers but not the actual names. Check out this little flash quiz game to get a nostalgia kick.