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.

Crazy Egg of IssueTrackerProduct.com

September 25, 2006
0 comments Web development

Crazy Egg of IssueTrackerProduct.com Crazy Egg is a wicked service that allows you to measure where people click on your site. I have no idea how they do it. You basically install a piece of Javascript in your HTML code which must somehow hijack the mouseclicks or something and report this back to a Crazyegg database.

What really makes this tool shine is the Heatmap. The Overlay and List views are in comparison pretty boring and for that you might as well use standard web statistics tool for that. I'm not going to explain what the Heatmap is. Just look at the attached screenshot from a report I've made based on www.issuetrackerproduct.com

Truncated! Read the rest by clicking the link below.

Comparing Ruby and PHP

September 21, 2006
0 comments Zope

I was reading Of snakes and rubies; Or why I chose Python over Ruby which is an article comparing Python and Ruby. The blog article has loads of comments. This one I liked in particular

"For people writing good production code in PHP, I'm not trying to pile on - I know you get disrespected enough. It's possible to write well-structured sites on PHP, and lots of you do. It's just that in PHP, anyone can learn how to create spaghetti code in 10 minutes, but you have to learn a decent-sized body of knowledge to gain the ability to separate presentation from logic. By contrast, when novices get started in Rails, they're using good structure by default. They have to make an effort to screw it up."

Truncated! Read the rest by clicking the link below.

I knew it! You don't have to drink that much water

September 15, 2006
0 comments Misc. links

I knew it! I've always thought it was a myth that you have to drink 8-10 glasses of water per day. This Urban Legends Reference Page proves the myth wrong.

People always say that you should drink 2 litres, 10 glasses, etc. but if my body doesn't send me enough signals that it requires water I'm not going to drink that much. Listen to your body I say, it knows how much water it needs to do the stuff it does. I'm tired of people nagging to drink masses of water, it just doesn't make sense.

The reference page also points out another very interesting fact:

"Additionally, the idea that one must specifically drink water because the diuretic effects of caffeinated drinks such as coffee, tea, and soda actually produce a net loss of fluid appears to be erroneous. The average person retains about half to two-thirds the amount of fluid taken in by consuming these types of beverages, and those who regularly consume caffeinated drinks retain even more"

Bill O'Reilly nailed

September 14, 2006
2 comments Politics

Bill O'Reilly nailed Unless you're a die-hard US republican you probably don't watch Fox News and the Bill O'Reilly show. You might, like me, remember him from a part of Fahrenheit 9/11 when he tells Jeremy Glick to shut up (or was that another film?)

Bill O'Reilly is a nut. A unsympathetic right-wing nut. It's people like him that causes us europeans to disrespect and, dare I, hate the USA. I like and have an open mind about the USA but it's people like Bill O'Reilly being shown on a large national network that just makes me feel sick.

Here's a great videoclip on youtube.com where Phil Donahue has a right go at him. This is the best thing I've seen since George Galloway (my MP by the way) shredded this Sky News reporter to pieces

Dear american friends, if you want my respect back, do something to get these repulicans off the set. It's making me sick!