On badly configured Apaches (like on errr… my host :), URLs referecing directories and lacking a trailing slash (like /mydir instead of /mydir/) lead to an error : the webserver looks for a file named mydir instead of a directory.

After some googling and lots of testing, I've come up with a solution. This should even work on Apaches with virtual hosts enabled and bad ServerName directive.

Put this in .htaccess in your document root (given example is for my site of course, replace the server name with yours)

  1. RewriteEngine  on
  2. RewriteBase    /
  3. RewriteCond    %{REQUEST_FILENAME}  -d
  4. RewriteRule    ^(.+[^/])$           http://frenchfragfactory.net/$1/  [R=301,L]

Of course, you need mod_rewrite and the ability to override these settings in your .htaccess file.

Here are a few reference cards (refcards) I found and locally mirrored. I use some, I kept the others just in case. Best viewed with a printer and folded :)

Bash & Perl :
Bash quick reference card (7 pages, pretty good)
regexp quick reference card (really love this one)
Perl 5 reference (31 pages)
PerlWin32 quick reference card

Linux :
OnePage Linux Manual (good newbie sheet)
Linux Admin quick reference card
Linux Security quick reference card (need sharp eyes)
Linux Syscall quick reference card

Web software :
Apache quick reference card (very good and complete in 2 pages)
mod_perl
MySQL 4 quick reference card (Very good)
PHP4 quick reference card (too short to be really useful)

Web related :
CSS 1.0 quick reference card
CSS 2.0 quick reference card
DOM HTML 2 quick reference card
xhtml-1.0-frameset quick reference card
xhtml-1.0-strict quick reference card
xhtml-1.0-transitional quick reference card
XSL 1.0
xtm-1.0 quick reference card

Editors :
Vi (cool for newbies stuck in shell with no pico available)
TeX
VIM
XEmacs

Other Softwares and Misc :
The Gimp quick reference card
Photoshop quick reference card
TclTk reference (26 pages)
tcpdump quick reference card
C (ansi)
CVS
Delphi Technical Reference
GNU Calc
JSP

Ariane et Ozh à Paris
A friend sent me this picture from last year, August, in Paris. This is funny how my wife and I look like happy tourists since I absolutely hate this town. Soon or later I will have job offers in this city : I absolutely have to remember how much I dislike it, more than any advantage a job may have.
Don't even know if that ever makes sense in english by the way :)

I'm still playing a bit with my new layout.

I've added a css-javascript-cookie-based (thus, client side) solution for my bilingual needs. Errr. Wishes. Whatever. So, where available, you can display things in English flavor or in French taste (including potential mistakes since I'm not as fluent as I should after 13 years of english classes:)
Also, if you know a bit of French culture and its old cars, I hope you will enjoy my 404 not found page. G'night.

Welcome to the third version of my site !

The alpha version of my personnal site was an uberugly page on Compuserve in 1995, with enough animated gifs and background to overload my 33.6k connection :) Version 1 was a regular static html site, which you still can visit from the link above. Version 2 didn't really existed but was splitted in various places : code pieces were on a static page, then using Thought Bucket, and my rants and articles were written on a French Quake Community site I run.

This site now uses WordPress, an excellent "blogware" in my opinion. Well. Of course. Wouldn't be using it if I thought it sucked. As of today, the blog / news / main page, whatever you call it, is functionnal, but I still have to set up other pages.

I plan to store here mainly pieces of code I don't want to forget, maybe a few thoughts from time to time, most probably written in French, perhaps a few pictures. But primarily scripts. And don't expect everything to be both in French and English :)

In: , , On: 2004 / 05 / 01 Short URL: http://ozh.in/u

Collection of Perl one liners. The Camel ownz j00 all :)
Read More

In: , , , On: 2004 / 05 / 01 Short URL: http://ozh.in/t

Collection of one liners using the GNU/Linux utility "find". Can't remember where I found most of them :)
Read More

In: , , On: 2004 / 04 / 01 Short URL: http://ozh.in/s

CPU load :

  1. ps -eao "pcpu" | awk '{a+=$1} END {print a}'

Memory load :

  1. ps -eao "pmem" | awk '{a+=$1} END {print a}'
In: , , On: 2004 / 03 / 20 Short URL: http://ozh.in/r

This script logs CPU load for a given process, every n seconds into a file
Requires : bash, ps, awk
Examples :
psmon <process name> [delay [logfile]]
psmon sshd logs %CPU load from process sshd, every 5 seconds, to file psmon.log.[day]
psmon q3ded 10 q3ded.log logs %CPU load from process q3ded, every 10 seconds, to file q3ded.log
Read More

In: , , On: 2004 / 03 / 12 Short URL: http://ozh.in/q

This script emulates a (really ugly) perl shell within your bash (or wathever) session. I like it to quickly test a few regexps or a function.
Read More