google.pl - command line google search in a shell with perl

#!/usr/bin/perl# google.pl - command line tool to search google## Since I wrote goosh.org I get asked all the time if it could be used on the command line.# Goosh.org is written in Javascript, so the answer is no. But google search in the shell# is really simple, so I wrote this as an example. Nothing fancy, just a starting point.## 2009 by Stefan Grothkopp, this code is public domain use it as you wish!use LWP::Simple;use Term::ANSIColor;# change this to false for b/w output$use_color = true;#result size: large=8, small=4$result_size = "large";# unescape unicode characters in" content"sub unescape {        my($str) = splice(@_);        $str =~ s/\\u(.{4})/chr(hex($1))/eg;        return $str;}# number of command line args$numArgs = $#ARGV + 1;if($numArgs ==0){        # print usage info if no argument is given        print "Usage:\n";        print "$0 \n";}else {        # use first argument as query string        $q = $ARGV[0];        # url encode query string        $q =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;        # get json encoded search result from google ajax api        my $content = get("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&start=0&rsz=$result_size&q=$q"); #Get web page in content                die "get failed" if (!defined $content);        # ugly result parsing (did not want to depend on a parser lib for this quick hack)        while($content =~ s/"unescapedUrl":"([^"]*)".*?"titleNoFormatting":"([^"]*)".*?"content":"([^"]*)"//){                # those three data items are extrated, there are more                $title = unescape($2);                $desc  = unescape($3);                $url   = unescape($1);                # print result                if($use_color){                 print colored ['blue'], "$title\n";                 print "$desc\n";                 print colored ['green'], "$url\n\n";                 print color 'reset';                }                else{                 print "$title\n$desc\n$url\n\n";                }        }}

GPL vs. LGPL

Interesting thoughts on open source licenses:
"Yes, this is just me and my crazy theories. I haven’t done exhaustive
research to prove that liberal-license communities thrive more than
GPL communities. But the anecdotal examples are staggering. The very
foundation of Mac OS X, the operating system through which I’m typing,
is thanks to the liberally-licensed FreeBSD operating system. "

  http://www.red-sweater.com/blog/825/getting-pretty-lonely

My new linux box

Screenshot1

Since apple stubbornly refuses to release an updated mac mini I decided to switch back and buy a pc.
I didn't regret my decision. The new ubuntu release (8.10 intrepid) works just fine. Everything ran right out of the box without debugging or tweaking (sound, graphics, tv).
Then I played around with the system monitor conky, avant window manager and the ubuntu dust theme.
I think my desktop is even pretier then the OS X one (well maybe I was a bit tired of the look after ~3 years).
Well you may judge for yourself.

Here are some links if you're looking for the conky config or the theme:

Doom as an admnistation tool

The author seems to have a quite simple idea of what system administration is about (killing processes, mostly), but its an idea with potential.

"Certain processes are vital to the computer's operation and should not be killed. For example, after I took the screenshot of myself being attacked by csh, csh was shot by friendly fire from behind, possibly by tcsh or xv, and my session was abruptly terminated. "

http://www.cs.unm.edu/~dlchao/flake/doom/