Selling cookie info to third-parties is a classic example of you can make money without doing evil.
RSS

Ministry Gig

2008/06/25 filed under /metal

Last Sunday I went to 013, Tilburg to see Ministry in concert. Joffie was kind enough to accompany me and like predicted. It was awesome!

I tried to smuggle my Canon IXUS in there, but since they have fairly strict rules banning cameras (and they search anyone going in), I left it in the car and had to use my Nokia N95 instead.

The pictures are up at Flickr and I even had a chance to take two clips (crappy quality):

Posted by: B10m | permanent link | comments (0)

Bad taste

2008/06/14 filed under /personal

I like Y! movies' recommendation system, for it usually turns out quite ok. If they say I like a certain movie, a lot of times, it's true. But ermm, either their system is way off here, or I have a seriously bad taste.

52 people have rated this movie with an average of "dreadful", yet Yahoo happily informs me that I'll probably like this movie. Yay!

Posted by: B10m | permanent link | comments (0)

WWW::Mechanize::Plugin::Web::Scraper

2008/06/11 filed under /perl

Joffie asked me if Web::Scraper could handle authentication while retrieving the website in question. A good question and after digging in Tatsuhiko's code, I noticed that you can simply dump HTML in the scrape function, instead of just the documented URI object.

I remembered Tatsuhiko mentioning integration with WWW::Mechanize somewhere but I couldn't find anything yet. So I decided to write the little Mechanize plugin. Shockingly, and completely surprising, it now carries the name WWW::Mechanize::Plugin::Web::Scraper.

Scrape the planet!

Posted by: B10m | permanent link | comments (1)

Tank Man

2008/06/05 filed under /personal

Today, 19 years ago, one of my favorite pictures of all time was taken

tank man

Posted by: B10m | permanent link | comments (0)

Hotmail doesn't like b10m.net

2008/05/15 filed under /web

Last Friday, I received a call by a friend who invited me to an Endstille gig. He asked me why I didn't reply to his mail. Odd, I thought, for I did reply within 10 minutes after receiving. A day or so later, still no email, so I decided to do a little testing.

I opened up a hotmail test account and just tried to mail it. The hotmail mail server positively told my server that the message was accepted, but the mail was no where to be found. Not in the Inbox, Junk folder or any other place. It simply disappeared.

After a few struggles, I found a way to contact the postmaster(s) and quickly after mailing them my complaints, I received a canned answer back. The sophisticated SmartScreen filtering technology made my messages disappear in thin air. Smart indeed and thanks for not informing the sender of this block.

The fun part of the mail, I'll quote:

I am not able to go into any specific details about what these filters specifically entail, as this would render them useless.

Right! So they're so sophisticated that there's probably an easy way to get around them. Security through obscurity...

The friendly canned mail also suggested I'd use SPF, a technique to specify in DNS records who is allowed to send out emails on behalf of the domain. Great ... but I've been using that for a long time, so it wouldn't help.

Maybe I'm on some RBL? Nope, can't find it. A quick search however turned out that I'm not alone here. And based on the time stamp of that document, this problem exists for over a year already.

So, as of yet, I can't send out mail (or reply) to my friends with a hotmail account. Tough luck. If you want to reach me, use a different Reply-To header.

Posted by: B10m | permanent link | comments (1)

Planet.nl's odd summary

2008/05/09 filed under /news

I'm a big fan of Bloglines to keep track of the news and over there, I follow the RSS feed of planet.nl (a Dutch ISP that provides news as well). Today I noticed a headline with a truly bizarre summary of the news article:

The text translates to:

Prostitutes no longer welcome in the player's hotel in Austria

The wives of the soccer players won't come closer than the hotel lobby.

Excuse me? The soccer player's wives are now called prostitutes?

The full article puts the line in perspective:

Translation:

The rules are clear. The players are allowed to meet their wives or girlfriends only every now and then in the lobby. Prostitutes, matter observers and consultants aren't allowed in the hotel at all during the tournament.

Bad bad summary, Planet.nl!

Posted by: B10m | permanent link | comments (0)

Perl code highlighters

2008/04/28 filed under /perl

Perl can be a real mess, yes. Everyone knows it, a few try to disagree, but in the end, you can make Perl code look very cryptic. So maybe this post isn't really fair. Never the less, I'd like to point out an annoyance I have noticed for some time now.

All over the web, websites exist that allows you to dump some code. The website will highlight it accordingly to the chosen language. While this usually works fine, it fails a lot of times on the Perl variable $#. This special variable specifies the last index of a list. As you might guess, most highlighters see the hash and think: comment!

Let's use this code:

#!/usr/bin/perl

my @test = qw(Just another Perl Hacker);
print "Last index of the test list is:", $#test, "\n";
print "Oh, of course ... ", join " ", @test, "\n";

This is fairly easy code to follow, even for a non-Perl programmer, I believe, so it's up to you to figure out what it does ;-)

Now, let's see how a 10 random sites handle this:

Wrong (see the hash as a commenting prefix):

Correct:

Sad but true ...

Posted by: B10m | permanent link | comments (0)

Debitel Telemarketing

2008/04/10 filed under /personal

Recently, my contract with Debitel (a Dutch phone company) ended. Since another company could make me a nice deal (with my Nokia N95 8GB), I decided to switch over to them and to cancel my account with Debitel.

Today I received a call by one of the Debitel telemarketing guys. The slick guy told me my contract was about to end (yeah, duh, I already canceled it) and that he could offer me a really nice deal.

As usual, I let him finish his whole story (which, like usual, was way too long). And to make it more fun, I just didn't reply, making him feel awkward and chatting longer. After his whole speech, he asked me if I was interested. I told him politely that I already canceled the account and moved on to another provider.

"Ok", he said, "than we just have to check the information real quick. Your name is [full name]?". In my privacy paranoia, I asked him "Why do you need my information. I already canceled the account and thus I have nothing to do with you anymore. "Oh?", he replied, "I thought you wanted to accept the new offer". So I believe my privacy paranoia saved me here. If I'd confirm the records they already had on file, he'd probably trick me into accepting the new offer.

... bastards.

Posted by: B10m | permanent link | comments (0)

Google and Jakarta

2008/03/24 filed under /random_thoughts

Jakarta, the capital city of Indonesia has seen some name changes over the years. I trust Wikipedia on the dates here, but in history, the names have been Sunda Kalapa (397-1527), Jayakarta (1527-1619), Batavia (1619-1942), Djakarta (1942-1972), and now Jakarta.

Dropping the 'd' in front of the name has to do with the new spelling of the Indonesian language (Bahasa Indonesia). Again, I trust Wikipedia on the dates and history, but since 1972, the "new spelling" mandated that the 'd' was dropped.

So far so good, but recently I noticed that Google has trouble keeping up with this new spelling. On maps.google.com, they tell me the city is called "Djakarta", as you can see here:

Oddly enough, they do write Jayapura correctly. Also Bandung, instead of Bandoeng (which changed in 1947) is written correctly. Other mapping websites all seem to handle the 36 year old name change correctly.

Expedia.com:

Maps.live.com:

Mapquest.com:

NationalGeographic.com:

UN.org:

Maps.yahoo.com:

Since I find this a strange error, I decided to write an email to Google asking them for the reason for this and whether there are plans to update this. I'll keep you posted on the results of that mail (if ever get a reply).

Posted by: B10m | permanent link | comments (2)

QRCode Bookmarklet

2008/03/15 filed under /software

Since I now own a fancy Nokia N95 (8GB), I also have the barcode/qrcode reader which is quite handy. When you see an image like the one below, the scanner will extract the URL and allows you to open it (beats a lot of typing).

A QRCode image looks like this:

This little bookmarklet can help you surfing the web. Drag it to your bookmark toolbar and hit it whenever you want to view that page on your phone too. It'll create a QRCode image with the URL of the page you're viewing.

Posted by: B10m | permanent link | comments (0)

CGI's UPLOAD_HOOK

2008/02/02 filed under /perl

Many a time, I see people asking and messing with CGI uploads and progress bars.

First of all, I believe an upload progress bar is the responsibility of the browser (client) and not of the server. The client knows the file size it is uploading and how many bytes it sent over the wire. Regardless, progress bars are fairly nice, especially with large(r) files. So let's see how we can implement one.

Perl is very well suited to show you the upload progress (I believe it's more tricky with PHP), due to the UPLOAD_HOOK facility of CGI

The documentation isn't too extensive, so let's just look at an example. First of all, you'd need to understand what needs to be done. After someone hits the upload button, we need to query the server over and over, to get the upload status. Javascript kicks in here.

To display the bar, I simply use an existing script, for a) it looks better than anything I'd ever create and b) it works :)

Bram.us 's jsProgressBarHandler is the one I chose for this example.

Ok, so now first take a look at the hook subroutine. First you'd have to create an instance of the CGI object like this:

my $q = CGI->new(\&hook);

The hook subroutine isn't too fancy either. I use File::Slurp to write the percentage to a file that we can query later.

sub hook {
   my ($filename, $buffer, $bytes_read, $data) = @_;
   my $perc = sprint("%i", (($bytes_read / $ENV{CONTENT_LENGTH}) * 100));
   write_file("/tmp/$ENV{REMOTE_ADDR}", {overwrite => 1}, "$perc");
}

That's all it takes.

Now, on the frontend, we simple query this file over and over, like this:

   function doUpload() {
      $('progress').show();
      var intervalID = window.setInterval('doProgress()', 1000);
   }

   function doProgress() {
      var d = new Date;
      new Ajax.Request('progress.cgi?time='+d.getMinutes()+
                       '_'+d.getSeconds(), {
         method:'get',
         onSuccess: function(transport){
            myJsProgressBarHandler.setPercentage('progress', 
                                                 transport.responseText);
         }
      });
   }

The function doUpload shows the progress bar and calls doProgress every second. Since Internet Explorer seems to think that caching the Ajax.Request is a smart thing to do, I simply post the minutes and seconds to the script aswell.

And progress.cgi isn't so fancy either:

#!/usr/bin/perl

use strict;
use File::Slurp;

print "Content-type: text/plain\n\n";
my $perc = read_file("/tmp/$ENV{REMOTE_ADDR}");
print $perc;

This works rather well on my machine(s) and it's really simple, as you can see. The only downside is that when two people sharing the same IP address start uploading at the same time, they'll probably get the wrong information. But hey, who cares? ;-)

Posted by: B10m | permanent link | comments (4)

VoipBuster Addressbook

2008/01/30 filed under /software

VoipBuster is a website I quite like. They offer cheap (inter)national phone calls from phone to phone. To make the phone calls, you can download some Windows software, or use the web-interface. Since I don't use MS Windows (and think running VMWare/Wine for such a simple application is overkill), I end up using the web-interface.

The only problem is that I cannot seem to remember people's phone numbers (including my own), so I wrote a little Greasemonkey script called: VoipBuster Addressbook

It's really quite simple. All you have to do, is use VoipBuster like you're used to. But, when you add a phone number (either your own, or a destination address), the script will prompt for a name and adds that to a drop down list. The next time you want to make a call, simply select the name from the drop down and the number is entered for you.

Posted by: B10m | permanent link | comments (0)

Fokke en Sukke RSS Pipe

2008/01/06 filed under /personal

A little less than a year ago, I created a simple scraper for the Fokke en Sukke cartoon website. It would spit out a RSS feed that I could include in my bloglines. Yay, so far so good.

Slowly but steadily I noticed more users until a certain MS Vista widget start querying it every 20 minutes (for no reason, for there aren't that many updates). At first I had no clue what was going on. Huge amounts of IP addresses started querying the feed, all with a cryptic "x-gadget:///gadget.htm" HTTP_REFERER.

After some searching, I found the author of the widget and asked him to please lower the rate of querying, for my poor old home server was not used to the stress put on him. Luckily he promised to patch it soon.

Then I figured: why not have Yahoo! host it? So I've hooked up a terrible simple pipe that seems to handle the load well.

Stats:
Published on 01/02/08
113572 runs

Taken that it's only 01/06/08 now, I may assume that it gets requested around 28393 times a day. Thanks for taking away the pain, Yahoo! :-)

Posted by: B10m | permanent link | comments (0)
return-member