Out of pure boredom and because I did enough work on my thesis today (…and because there wasn’t anything decent on TV), I decided to distract myself with a little coding. This is what came out:

LastVenue

Just download it, rename the filename ending to .php, configure it by pasting in the last.fm URL of your desired location and upload it to your webserver. You will also have to download SimplePie that takes care of the all the RSS stuff and place it in the same directory as the LastVenue script.
If you want to include it into a PHP script paste in the following:
include('lastVenue.php');

This script pulls all events for a specific venue from last.fm and lists them in a simple, CSS styleable unorderd list. The script is meant to be included into a webpage and thus features none of the other HTML markup to make it into a full document. It basically only echoes out a headline and a few list items.

Oh yea, of course the script is Microformats enabled 😉
Microformats enabled

Note: the AJAX loding functions got skipped, because I’m really tired right now. Maybe they’ll show up in version 2.0 …who knows?

grep is a useful little *nix command line utility that makes it easy to search for strings in files. The real beauty comes when you start using it with pipes. One thing that kind of bothered me since I started using it, that it didn’t highlight the string you where searching for in it’s output.
Turns out, this can be accomplished very easily (should really just have reade the man page 😉 ).

Put the following in your shell startup script (/home/flo/.bashrc in my case)
export GREP_OPTIONS='--color=auto'
Now that was simple wasn’t it (though you’ll have to re-log in to make it work or at least spawn another shell process, so the startup file gets sourced) 🙂

But now if you followed my tip and started using pipes like mad, after applying this tip, you’ll quickly encounter that the colors are gone again. To hand over colors to say the often used less program you have to make an alias that hands grep the --color=always option (don’t put this in GREP_OPTIONS it tends to break things!) and call less with the -R option.
Or simpler, just add the following to your shell startup script:
export LESS=-R
alias cgrep='grep --color=always'