Sunday, 7. August 2005 Week 31

Fight Spam

Since this weblog received about 100 spam comments last week, i implemented a simple spam-filter based on a badwords list.
If a comments text contains more than four occurences of the following words, it won't get added and the user is redirected to the mainpage.

Thanks to very specific spam content, it only needs a small list of badwords to detect the spam.

  • texas
  • holdem
  • casino
  • poker

This is just a simple anti-spam mechanism, but for now it works perfect and i hope it remains so for a long time :-)

Monday, 1. August 2005 Week 31

Les Landes 2005 - Teil 1

Um 20.30h fängt der Film an. Wenn du den Zug nimmst, der in zehn Minuten fährt, reichts noch!
Und so habe ich mir am Freitag vor zwei Wochen noch schnell Mr. & Mrs. Smith angeschaut. Als ich nach dem Kinobesuch wieder Zuhause angekommen war, musste ich mich beeilen um noch meine Sachen zu packen damit wir um vier Uhr morgens in Richtung Frankreich losfahren konnten. Wir verbrachten unsere Ferien nocheinmal im Derpartement des Landes in Moustey. Da ich auch meine Digitalkamera mitgenommen hatte, gibts diesmal sogar ein paar Bilder.



Blick zur Tür hinaus
Blick zur Tür hinaus
Les Landes ist voller Pinien
Les Landes ist voller Pinien
Pomme de pin
Pomme de pin
Ein Glühwürmchen photographiert mit Infrarot
Ein Glühwürmchen photographiert mit Infrarot
und mit Blitzlicht
und mit Blitzlicht
Mond, Belichtungszeit 30 Sekunden
Mond, Belichtungszeit 30 Sekunden
Mond, Belichtungszeit 10 Sekunden
Mond, Belichtungszeit 10 Sekunden
Mond, Belichtungszeit 30 Sekunden
Mond, Belichtungszeit 30 Sekunden
Eine Eidechse
Eine Eidechse
Zwei Eidechsen
Zwei Eidechsen
Spezieller Grashüpfer
Spezieller Grashüpfer
Viaduc de Millau
Auf dem Rückweg überquerten wir den Viaduc de Millau
Viaduc de Millau
Viaduc de Millau
Viaduc de Millau
Viaduc de Millau
Brücke von Les Vignes
Brücke von Les Vignes
Felsformation bei Les Vignes
Felsformation bei Les Vignes
Ferienlektüre
Ferienlektüre
Hängematte
Saturday, 2. July 2005 Week 26
Thursday, 30. June 2005 Week 26

rl and rs

rl and rs are two small command-line programs written in C.

  • rl removes starting line(s) from stdin.
  • rs reverses it's input.

The source code is available under the BSD License:

Sunday, 17. April 2005 Week 15

linux-2.6.11.7-alubuttons.patch

Da gerade mein Kernel "geupdatet" wird, habe ich den Patch zur Unterstützung der PowerBook Buttons an die aktuelle Kernelversion angepasst.

Bei dieser Gelegenheit habe ich den neuen Patch an ein paar Kernelentwickler geschickt, vielleicht schafft er's diesmal bis in den "offiziellen" Kernel.

Update:
Der Patch hat's bis zu Linus geschafft ([PATCH] macintosh/adbhid.c: adb buttons support for aluminium PowerBook G4), wird also in der nächsten Kernelversion dabei sein :-)

Sunday, 3. April 2005 Week 13
Friday, 1. April 2005 Week 13

Typhoon Webshot II und Linux

Typhoon Webshot II (Thumbnail)

Heute habe ich beim Einkaufen diese 'Webcam' entdeckt. Für 29.90 CHF (~20€) bietet sie bis zu 30 640×480 Pixel grosse Bilder pro Sekunde. Mit dabei eine CD mit Treiber für Windows 98 bis XP.

Als ich sie an mein Linux-PowerBook anschloss sagte mir dmesg nur gerade diese zwei Zeilen:

ohci_hcd 0001:01:1b.0: remote wakeup
usb 3-1: new full speed USB device using address 2

Von usbview wurde die Webcam auch nicht erkannt. Also super Voraussetzungen für einen Betrieb mit Linux.

Nach etwas googeln fand ich spca50x.sf.net und das entsprechende 2.6er-Kernerlmodul. Erfreulicherweise ist das auch im Portage-Tree von Gentoo. Also schnell ein emerge spca5xx. Ein modprobe spca5xx lässt einige Fehlermeldungen erscheinen (Unresolved Symbols). Abhilfe schafft das Aktivieren der Video for Linux Unterstützung im Kernel. Nach make, make modules und make modules_install lädt das spca5xx Modul problemlos (eigentlich sollte man nach einem Neukompilieren des Kernels auch den neuen Kernel laden und nicht nur die neuen Module!).

Ein chmod a+rx /dev/video0 als root behebt Berechtigunsprobleme, welche beim Zugriff als normaler Benutzer auftreten können.

Fazit:

  • Die Webcam bietet IMHO mehr als man für 30 CHF erwarten kann
  • Mit Linux kann man ohne Neustart Peripheriegeräte von 'unbekannt' zu 'vollständig unterstützt' ändern

Bug in MySQL 4.1.10a?

Bisher wurden die Einträge der Indexseite mit diesem SQL-Statement abgefragt:

SELECT w.*, a.nick AS nick, cat.name AS categoryname, 
count(c.id) AS comments, 
l.name AS languagename, l.code AS lc 
FROM `x-log_weblog` AS w, `x-log_authors` AS a, 
`x-log_languages` AS l, `x-log_categories` AS cat 
LEFT JOIN `x-log_comments` AS c ON w.id = c.posting 
WHERE a.id = w.author 
AND cat.id = w.category 
AND w.date <= NOW() 
AND w.public = '1' 
AND w.language & l.id > 0 
GROUP BY w.id 
ORDER BY w.date DESC

Doch seit Hostpoint auf MySQL 4.1.10a umgestellt hat, stimmt die Anzahl der Kommentare nicht mehr.

Nach diversen erfolglosen Versuchen die LEFT JOIN Anweisung zu ändern, habe ich in einem Bugreport eine Lösung gefunden:

count(DISTINCT c.id)

Mangels spezifischer Kenntnisse kann ich nicht beurteilen ob das nun ein Bug oder ein Feature ist. Aber da mehrere Bugreports dazu existieren scheint es eher ein Bug zu sein.

Sunday, 6. March 2005 Week 9

Samael – On Earth

Samael - Reign Of Light

Before we could talk
We were singing
Before we could run
We were dancing
Life is short
But not a day is lost
The world goes round and round
And we go on and on…



Beijing to Amsterdam
Berlin to Buenos Aires
Sydney to L.A.
Rio to Abidjan
Stockholm to Athena
Dublin to Guatemala
London to Brasilia
Madrid to Philadelphia

Paris to San Francisco
Detroit to Warszawa
Moscow to Mexico
Oslo to New Dehli
Helsinki to New Orleans
Vienna to Ankara
Roma to Lisboa
On earth, we're all

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Wide World!
Our World!

New York to Tokyo
Melbourne to Budapest
Prague to Jaipur
Shangai to Montreal
Vancouver to Singapore
Sofia to Johannesburg
Hong Kong to St. Petersburg
On earth, we're all

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Wide World!
Wide World!
Our World!

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand