LEFEVRE Damien .net

Tuesday 6 April 2010, 12:51

Move SVN repository into another repository sub-folder

svnadmin dump /path/to/repository > repo_name.svn_dump
svnadmin load --parent-dir new/subdir/for/project  /path/to/new/repository < repo_name.svn_dump

Wednesday 13 January 2010, 12:43

One of the funniest gag ever :D

Check this video WITH the sound :D


Monday 14 December 2009, 07:19

ZoomBrowser EX installer

Those smart asses from Canon won't ship the ZoomBrowser EX installer, only updaters.

I've got an XP laptop.

So the what you should do is:

Canon does not seem to know what is a multilanguage installer either. So choose carefully alternative downloads for the language you are looking for...

Thank you Canon for wasting my time!!

Monday 26 November 2007, 23:04

Force web browser encoding to UTF-8

I had to work on a website in Finnish for a friend. With my server in France there was some issues with the encoding detection and the page was full of weird signs.

To fix this I created a .htaccess file to the website root directory and added the following line to force all the .html files to UTF-8

AddCharset UTF-8 .html

That's it! The web browser goes to UTF-8 encoding automatically.

Thursday 21 June 2007, 12:32

Generating an SSL Certificate with Apache+mod_ssl

  • Generate key:

openssl genrsa -des3 -rand file1:file2:file3:file4:file5 -out server.key 1024

  • remove encryption or will ask for the passphrase every time apache reboots:

openssl rsa -in server.key -out server.pem

  • Generate CRS:

openssl req -new -key server.key -out server.csr

  • Generate the self-signed sertificate:

openssl x509 -req -days 60 -in server.csr -signkey server.key -out server.crt

Virtual host definition:

<VirtualHost _default_:443>
ServerAdmin webmaster@domain.com
DocumentRoot /usr/local/apache/share/htdocs
ServerName www.domain.com
ScriptAlias /cgi-bin/ /usr/local/apache/share/htdocs/cgi-bin/
SSLEngine on
SSLCertificateFile    /usr/local/apache/etc/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/etc/ssl.key/server.pem
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog /usr/local/apache/var/log/ssl_request_log \
        "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

Thursday 3 May 2007, 21:25

Article in Attic web magazine

OAMK web magazine made an article about my story in Finland and my work with PyS60. Here's the link (in English :) ):

Wednesday 2 May 2007, 11:45

The trick of the day!


Today I'm getting very pissed off with the building company where I'm living which clearly does everything to cut on budget for our crappy student buildings. So since a week we don't have any heating in the rooms anymore and it is between 2 - 5 degrees outside during the day, I don't know at night.

Since we don't have to pay for electricity and that I have 4 desktop machines + one laptop I came out with a solution for heating my room: the boolean heater :)

The idea is quite simple: keep your processor(s) busy in order to create some heat from the extraction fans!

Current development

Create a roomheater.py file. Here is the source :D

#!/usr/bin/env python
# file: roomheater.py
# author: LEFEVRE Damien
# version: 0.1
# description: boolean room heater
# Copyrights 2006-2007 LEFEVRE Damien
print """********************************************************************************
                           Welcome to the boolean room heater
                                   LEFEVRE Damien
while 1: pass

And then run:

>>>python romheater.py

Voila! :D

I get the following results:

  • PIII: processor 100% in use
  • Sempron 2600: processor 100% in use (very good heater!)
  • Core 2 Duo: processor 50% in use (so I can still work)

I just hope you'll be able to stand the noise ;)

Future development

Hard disks are producing a very good quantity of heat. Once I find a dummy task to perform on disks that would create heat, I'll add it right away to the application ;)

With my best regards,