Oracle example schema for MySQL

Anyone who has worked with Oracle has encountered the Oracle “hr” schema in one way or another. The Oracle example schema provides a few simple tables with example data to test out some queries or learn SQL.

So when working with MySQL, I like to have the same schema as well. Luckily, Andrei Ciobanu feels the same way and he provides a wonderful adaptation of this sample schema for MySQL on his website: HR Schema for MySQL and Maria DB.

The SQL script for the schema can be found on GitHub: nomemory/hr-schema-mysql (or in my fork: simonkrenger/hr-schema-mysql).

Thank you Andrei!

LIGHTTPD: Google+ Redirection

Lately, I have seen a few personal sites that redirect /+ to the personal Google+ profile. I thought “What a good idea!”. Sadly, my quick search on Google itself only showed how to do it with Apache (see here for example). Since I am using lighttpd this obviously does not work for me.

So here is how to do it with lighttpd:

$HTTP["host"] =~ "(^|\.)krenger\.ch" {
        # Redirect /+ to Google+
        url.redirect = ( "^/\+" => "https://plus.google.com/115712438575389450995/about")
}

The result is something like this: http://krenger.ch/+