A knight’s tale

heath_ledgerOn January 22nd 2008, a very shocking event took place. The very popular actor, Heath Ledger, was found dead on his New York apartment in SoHo. I read about it a couple of days later and was rather shocked. He was a very young man and there was a mystery around his death. A few weeks later, it was found that his death was caused due to accidental overdose of prescribed medication (my source is IMDB). He was an actor i really admired and never took the chance to take a look at his bio. After a whole year, i feel like writing this small post on his memory since i liked him alot. The info below are actually a small sum of what i found on the net (especially IMDb) on him.

(more…)

I am “Lost”

Well not like the series… As many of my readers must have noticed lately i am somewhat gone from the scene of the blogoshere. I do not post, don’t comment, don’t tweet and all of this happened unexpectedly. Well i just wanted to let you all guys know that all is well except a small hiccup. My laptop died (again) due to a mulfunction on the motherboard. Therefore i lost bookmarks and stuff and i have to work from a much slower, older and desktop PC. That makes my online identity suffering right now. The repair will take a couple of weeks and, during this time, i won’t be around much. I will probably post a couple of stuff but i won’t be able to be as active as i would like to. Also i would like to apologize from my fellow bloggers since i am not able to visit and comment. I’ll do my best to get on top of this but, still, i won’t be as efficient so, sorry guys.

But! Keep on coming. I won’t let it take over me. I’ll find my way and do my best. Hope to see you around!

FunnyInbox: How about a nice laugh?

funnyinboxHere i am with another project of mine! FunnyInbox is my latest work. It all started a few days back when i received a funny email from a friend with an attached video of about 4 megs. Immediately I remembered talking to a friend a few months back where we were saying that all these funny emails give us a nice laugh but fill up our inboxes and put some serious load on the mailserver. Why wouldn’t someone take the time to upload to an external host and then just provide us with the link? Well just because the “Forward” button seems so easy to push. That’s true. So, i decided to put up a site where all my funny e-mails would go. No more forwarding (actually i almost never forwarded). Any funny e-mail that will land on my inbox and i feel it’s funny enough to share it with you guys will go there. My ultimate goal is to create a site that someone, on his spare time, would browse just to take a good dosage of fun. Videos, pictures, picture collections, PPT’s are things i’ll be posting there. I know that there are millions of funny sites out there but frankly i don’t care :) All i want is a place to collect some fun things and share with friends.

Now, you can also help! If you have any e-mail that you think is funny just forward it to me at the email: mails [at] funnyinbox [dot] net. In return i will include a name and a link back to your site as a thank you. If you want to check out more about sharing please see here.

So, do you like the place? Do you think that you will become a regular?

7 of the most idiotic people of 2008

This email hit my inbox a few minutes ago from my beloved aunt Angie, and when i read it i decided to share this with you guys. I don’t know if this is published somewhere (if so please comment so i can give credits to the author) but i really think you guys are going to enjoy this. So, it’s like a “Golder globe” award to stupidity that took place last year. So here they are in reverse order.

#7 The traffic genius

In a semi-rural area (Weyauwega, Wisconsin) a new neighbor called the local township administrative office to request the removal of the Deer Crossing sign on the road. The reason: ‘Too many deer are being hit by cars out here! “I don’t think this is a good place for them to be crossing anymore.” I think the township needs to put up an Idiot Crossing sign in front of this guy’s house.

#6 Beeing drunk doesn’t make a difference

Arkansas : Seems this guy wanted some beer pretty badly. He decided that he’d just throw a cinder block through a liquor store window, grab some booze, and run.  So he lifted the cinder block and heaved it over his head at the window. The cinder block bounced back knocking him unconscious. It seems the liquor store window was made of Plexi-Glass. The whole event was caught on videotape. Yep, here’s your sign.

#5 Don’t move! I mean everybody!

A pair of Michigan robbers entered a record shop nervously waving revolvers. The first one shouted, ‘Nobody move!’ When his partner moved, the startled first bandit shot him.
This guy doesn’t even deserve a sign.

(more…)

Quick URL parsing using Perl

Have you ever stumbled on a page that you would like to copy-paste all the links from and, darn, they were many? For instance when you get that directory listing and you want to download all the files? Well, i faced the problem these days. I wanted to copy more than 30 consequtive links from a directory listing and i thought that it’s plain stupid doing it by hand. Now, the first thing that popped into my mind was a FireFox plugin. I started looking here and there and every one of those had something i didn’t like. So, then it came to me. I would copy the page source and then use a little Perl script to extract those links. Sounds hard? Well it’s not since Perl is the right thing for this job. So, a little tinkering here and there and this is what i came up with.

  1. #!/usr/local/bin/perl
  2. package MyParser;
  3. use base qw(HTML::Parser);
  4. $prefix = "http://a_site_do_use.com";
  5. sub start {
  6.         my ($self, $tagname, $attr, $attrseq, $origtext) = @_;
  7.         if ($tagname eq ‘a’) {
  8.                 print $prefix.$attr->{ href }."\n";
  9.         }
  10. }
  11. package main;
  12. $file = "urls.txt";
  13. open(URLS, $file);
  14. @lines = ;
  15. close(URLS);
  16. $html = "";
  17. foreach $line (@lines){
  18.         $html .= $line;
  19. }
  20. $parser = MyParser->new;
  21. $parser->parse( $html );

A quick explanation of it is this. We use the HTML parser that Perl brings in. It’s a pretty nifty tool. If you want to use this as is you need to check out two things. One is that the contents of the page to extract the links should be on a file “urls.txt” and the second is that if the URL’s are relative (just like the ones that apache produces on a directory listing) you need to add the full prefix on the “$prefix” variable. If you want to tweak it be my guest. It’s draftly written anyway. If you don’t feel comfortable with code then go for those plugins. They are pretty good. Just not for me.

So, i hope this helps out for you guys as it surely did for me!

PS: I know it can be written more effectively but it works so i’m done tweaking :)

« Previous Entries