Saturday, 24 October 2009

Thursday, 13 August 2009

Greasemonkey + Facebook

Psst, facebook, I don't want to be friends with random people just because "we both went to UBC", or "we both live in Vancouver". UBC is pretty big, so is Vancouver. I also don't want to become fans of things just because my friends have. So.. bye-bye suggestion box:

Step 1, install greasemonkey:

Step 2, install this greasemonkey script, just detaches the suggestion box from the HTML, making it disappear, the more elegant solution would be if facebook would just not send the HTML in the first place.. but that's asking too much mehtinks:

Step 3, enjoy facebook without the stupid suggestion box.

Wednesday, 22 July 2009

Recovering Ubuntu

A few days ago I did something bad.  I did a distro upgrade to bleeding edge Ubuntu (9.10) before release, all for the want of the latest version of libvirt on my antiquated laptop.

I know pre-release software might be rough around the edges, I know things might not work, but I didn't really care, after all these things are usually fixed over time.  However, what I didn't bargin for was that the upgrade process was to totally bjorked that it sent dpkg into an infinite loop unpacking the same packages, over and over again, until I stopped it.

Big mistake, but what else could I do?

Thursday, 25 June 2009

Error message FAIL

I'm trying to get libvirt working, just to play with it.  Here's the error:

libvir: Network Config error : cannot create bridge 'virbr0': Package not installed

Package not installed?  But the bridge utilities are installed.  After much googling, I discovered it's a bridge-utils error message, and here's my translated version:

Ethernet bridging support isn't enabled in the kernel

lrn2writeerrormessages.  kthx.

Tuesday, 16 June 2009

nVidia blocking signal problem fixed

have been experiencing this bug since the 180.35 nVidia drivers were released.  The dreaded blocked signals bug.  The .37 driver was supposed to fix it, and did for many people, but not me.  Neither did .41, .44, .51, or the latest ones, 180.60.  This wasn't a big problem,  I reasoned I'd just wait until it was actually fixed and continue using the 180.29 drivers.  That waiting ended today when I upgraded to kernel 2.6.30 and discovered the .29 drivers don't build against that kernel.  Curses.

Wednesday, 3 June 2009

Profiling PHP Code

I have a PHP script I wrote for my research that takes stupidly long time to run. Why? I don't know.  So on an off chance of finding something useful, I put "PHP profiling" into google.

So it turns out that PHP profiling is a huge topic, there are many websites ready to provide HOWTOs and tutorials for a zillion different techniques.  And, like everything in the computer world it seems, the solution is easy and sifting through all useless advice and "type-this-random-thing-into-your-console" is what takes the time.

Here's what gentoo users need to know:

  1. emerge xdebug

  2. Edit /etc/php/php-cli/ext/xdebug.ini , set xdebug.enable_profiling="1", and I also had to increase my max_nesting_level to "1000".  It took forever to figure this out, ALL the documents say "oh, just put the settings in php.ini.". WRONG.  They get ignored in there.

  3. Install kcachegrind, and use it to load the profile dumps now being written in /tmp/cachegrind*


Friday, 13 February 2009

Rogers sold my email address

One of the advantages of having my own domain name is that I can give out a different email address to every company that wants my email.  I use a pattern to generate these addresses, they're not one-word somethings that a spambot would guess.

Yesterday, I recieved an email from with links that point me back to to unsubscribe and view things.  They're advertising.. 30% off.. something... my email client doesn't load the remote images (also from so I can't see the majority of their email, but that's not the point.

The email was TO the email address that Rogers Canada (and only Rogers Canada) has for me.  So, a big thanks Rogers for selling my email address to spammers. I don't remember seeing "will sell your email address to spammers" in their privacy policy, but perhaps it has been updated and someone could point me to that clause?

Wednesday, 11 February 2009

iPhone Bliss

I have three beefs with my iPhone:

  1. I can't use gtkpod or other software to sync my music, because it's running firmware >= 2.0

  2. Disregarding music, I can only sync everything else (contacts, whatnot) in Linux over ssh to a jailbroken iPhone (requires remote mounting via. sshfs), even if the phone is sitting beside, me plugged into a USB port.

  3. 1 and 2 should happen automatically as soon as I plug in to USB, I shoudn't need to drop to a terminal and type stuff.

Happily, there is a solution for all 3.  Here, I'll talk about 1 and 2.