## Howto: random mysql entry

June 26th, 2009

To select one randomly chosen entry of your list

`\$sql = "SELECT * FROM table LIMIT ".mt_rand(\$min, \$max).", 1";`

Here, \$min can be 0 and \$max could be the count of all the entries:

`\$sql = "SELECT COUNT(*) FROM table WHERE 1";`

June 19th, 2009

Internet makes lifes harder, too.

## Rest in peace, Heinz Schröder.

June 12th, 2009

He died on April 22th 2009, two days before his 81st Birthday.

He was a great popular German puppeteer and played a lot of the very popular puppets, like:

• Herr Fuchs (Mr. Fox)
• Frau Igel (Mrs. Hedgehog)
• Brummel the bear
• Bummi the bear
• Onkel Uhu (Uncle Eagle Owl)
• Casimir from Das Spielhaus (The Playhouse)

He played in front of children untill he was 80:

## Missing Firefly

May 22nd, 2009

If you miss Firefly and Serenity, you can sign this petition. – No! Better sign this in any case! Do it!

Meanwhile, you may listen to a award winning fan-podcast: The Signal.
Also, there three comics by Joss Whedon. But a TV series would be much better!

And please keep a minute’s silence for Dom DeLuise, who died on May 4th.

Remember Dom DeLuise

May 22nd, 2009

## HowTo: My own Decision making #1

May 15th, 2009

I want to describe how I schematically do decide between something, if I can’t decide it by myself.

1. List all the alternatives you can find
2. For every alternative, list all the properties (e.g. features) that the alternatives offer (you can order them by descending usualness, first the most common abilities, then the unique ones, for example)
3. assign a value to every property: If x out of N other alternatives got the same property, assign N-x to that property.
4. You may weight the values now. What is important to you? Multiply it by 1.5.
5. Sum up the values of each alternative. The alternative with the highest value wins.

## Software: The Ultimate Music Player for Linux

May 2nd, 2009

From now on, I’ll use Quod-Libet under any Linux distribution.

It is written in python and has already many plugins. Also it supports replay-gain, lyrics and file renaming. My final decision fell on it, because it can exclude files from being scrobbled (defined by regular expressions) and has a search query that supports regular expressions, too.
So you can make dynamic playlists with regular expressions and that means, I can do, all I want to!

I installed it on Ubuntu:

`sudo apt-get install quodlibet quodlibet-plugins`

and enabled some plugins, first:
* AudioScrobbler (incl. exclusion)
* Automatic Rating (by skipping behavior)
* Internet Radio Log (saves list of lately played songs)
* Lullaby (makes QL pause at time)
* Notify
* Random Album Playback (Plays random album after having played an complete album)
* Tray Icon

My hot playlist is currently simplier because of the Automatic Rating:

`#(rating > 0.5)`

Then I configured the global hotkeys:

## Script: Windows (XP) and Gnome Wallpaper changer

April 24th, 2009

Simillar to the gnome version, I finally got a wallpaper script for Windows. You need Python and the Python Imaging Library having installed.

## Script: hot winamp playlist view

April 17th, 2009

After right-clicking “Local Media” in your Winamp Media Library, paste the following code line into the field for advanced view queries:

`(rating isEmpty) OR (rating = 1 AND lastplay > [5 weeks ago]) OR (rating = 2 AND lastplay > [4 weeks ago]) OR (rating = 3 AND lastplay > [3 weeks ago]) OR (rating = 4 AND lastplay > [2 weeks ago]) OR (rating = 2 AND lastplay > [1 weeks ago])`

## Script: replay gain them all

April 10th, 2009

You know, if the volume of the music you’re playing does always alter, you should try this:
On Ubuntu, first, you need to install the following:
`sudo apt-get install mp3gain`
Then create a new file containing following bash code:

```#!/bin/bash find /path/to/your/music/folder -iname "*.mp3" -execdir mp3gain -a -k -p -q ""{}"" +```

This* will apply a album replay-gain meta tag to your mp3s. Don’t worry, the script won’t alter the data of the files, it just adds the tags. Now, if you play that with a player which is able to support replay-gain like Rhythmbox, Songbird, Winamp, Foobar2000 or what ever you choose, it’ll sound much more even.

On Windows, you should penetrate your music files with MP3Gain. Winamp also has a native replaygain analyzer: Mark the files of an album and right-click them: send-to -> replay gain

Note: I personally don’t apply the track replay-gain on my music, because I think, altering sound in music is an important style element and manipulates the feeling. Especially in soundtracks and classics.

*) You need to replace `/path/to/your/music/folder` to your music folder