How girls/guys rate guys/girls

February 27, 2010
1 comment Misc. links

How girls/guys rate guys/girls It's of course a simplification but is it not true? Come on, admit it, isn't there something to it?

What do you think? As a man I must admit that it does feel like that. I don't know about the girls perspective so I'd love to hear what you think (keeping it mind that it's an exaggeration)

Last.fm Tube Tags

February 13, 2010
0 comments Music

Last.fm Tube Tags Last month I marveled over the cute LastGraph which shows you a visualization of what artists you've been listening to on Last.fm lately in a neat way. Today I discovered this cute visualization: Tube Tags

I think it's only for paying Last.fm users since it says "VIP" next to the link. My understanding is that it shows the genres of music you've been listening too recently in a London Underground type of map way. Very neat.

Here's mine (31Kb PDF)

Haiti Earthquake: Who's given what?

February 2, 2010
0 comments Politics

Haiti Earthquake: Who's given what? If I've understood it correctly, this is a mashup made on Guardian's API made by someone not at the Guardian. More photos here

What's interesting about this chart, which I've never seen like this before, is the last one where they show how much money various countries pledged versus how much they actually delivered. It's something I've also wanted to see because it opens up a whole new dimension of truth to the equation. For example, Canada has pledged USD 130m to the Haiti Earthquake but they only delivered 51% of what they pledged to the 2004 Tsunami crisis.

Healing Food Reference

January 27, 2010
0 comments Misc. links

Healing Food Reference Spotted this website called Healing Food Reference which is what the name says; a reference of food and their healing "power". From the home page:

"This site is part of a public education project created by Mike Adams, the Health Ranger, and hosted by Truth Publishing. Its purpose is to educate and empower consumers with information they can use to prevent and even help reverse degenerative disease. There are no commercial sponsors of this site, and neither Mike Adams nor Truth Publishing was paid anything to create this site."

Basically click on a type of food, for example tofu and you get a list of things it can help with such as fever and then from the fever page you can more foods that help.

At first I was a bit taken aback by the home page and huge amounts of text on it but once you're in it is so easy to use. Perhaps the reason the home page is jam packed with content is for his search engine optimization.

Guake, not Yakuake or Yeahconsole

January 23, 2010
4 comments Linux

I've been a big fan of Yakuake for a long time. It's a terminal you have open all the time in Linux that is shown and hidden, over any other windows, by a simply hit on the F12 button.

But as of more recent versions of Yakuake it has become really slow. It sometimes take 2-3 seconds from F12 press till you can type on the terminal. So I uninstalled it and tried Yeahconsole but I uninstalled it equally fast as I understood it was broken and didn't work at all despite being in the Xubuntu apt repositories.

Last but not least I ended up using Guake which not only works but also works really really fast. Screenshots here

Tip: creating a Xapian database in Python

January 19, 2010
5 comments Python

This cost me some hair-pulling today as I was trying to write a custom test runner for a Django project I'm working on that creates a test Xapian database just for running the tests. Basically, you can't do this:


os.mkdir(database_file_path)

Because if you do you end up getting these strange DatabaseOpeningError exceptions. So, here's how you do it:


import xapian
xapian.WritableDatabase(database_file_path,
                        xapian.DB_CREATE_OR_OPEN)

Hopefully by blogging about this some other poor coder will save some time.

Bookmarklet to replace the current domain with localhost:8000

January 17, 2010
1 comment Web development, Django

If you, like me, have various projects that do things like OAuth on Twitter or Google or you have a development site that goes to PayPal. So you're doing some Django development on http://localhost:8000/foo and click, for example, to do an OAuth on Twitter with an app you have there. Then Twitter will redirect you back to the live site with which you've set it up. But you're doing local development so you want to go back to http://localhost:8080/... instead.

Add this bookmarklet: to localhost:8000 to your browser Bookmarks toolbar and it does exactly that.

Here's its code in more verbose form:


(function() { 
   a = function(){
     location.href = window.location.href.replace(/http:\/\/[^\/]+\//,
            'http://localhost:8000/')
   };
   if (/Firefox/.test(navigator.userAgent)) { 
     setTimeout(a,0)
   } else {
      a()
   }
 })()