Archive for the ‘~home’ Category

April 12th, 2008 @ 08:35

I love them all. This movie is really great.

What we do in life echoes in eternity.

Death smiles at us all. All a man can do is smile back.

We mortals are but shadows and dust.

There was a dream that was Rome. It shall be realized.

Is Rome worth one good man’s life? We believed it once. Make us believe it again. He was a soldier of Rome. Honor him.

Last but not least, the last lines of the movie:

And now we are Free. I will see you again… but not yet… Not yet!

French ones:

Ce que l’on fait dans sa vie résonne dans l’éternité.

La Mort nous sourit à tous, nous tout ce qu’on peut faire c’est sourire à la Mort.

Nous mortels ne sommes qu’ombre et poussière.

Il y avait un rêve qui s’appelait Rome. Il doit être réalisé.

Est-ce que Rome vaut la vie d’un homme de bien ? Nous l’avons cru autrefois. Il faut le croire à nouveau. Il était un soldat de Rome. Honorez-le.

Maintenant nous sommes libres. Nous nous reverrons… Mais pas encore… Pas encore!

April 12th, 2008 @ 08:24

Ever heard of Gogh? This is a really nice drawing tool for graphic tablets owner (such as those by Wacom). However it stopped working on my Hardy system after some recent update. After some investigation, it appeared that it was due to python-xml being moved away of Python path because it interfered with stuff in Python core ; the whole python-xml package being scheduled for deprecation as soon as the reverse depends would be cleared. I figured it out and dropped the reference to python-xml package in gogh/settingsmanager.py, using a method provided by Python core xml stuff instead. It seems that quite a bunch of people are currently using xml.doc.ext.PrettyPrint from pyxml to output an XML document to a file, so I figured that posting this little tip might help someone :)

So, let’s say you currently have something like this to output your xml document “doc” to a file at path “path”, doc being an xml.dom.minidom.Document object (or similar):

        f = open(path, "w")
        xml.dom.ext.PrettyPrint(doc, f)
        f.close()

All you need to change is PrettyPrint call to make use of the .toxml() method of your document object instead:

        f = open(path, "w")
        f.write(doc.toxml())
        f.close()

Here you go, hope this might save someone’s day someday :)

April 11th, 2008 @ 18:07

Have you ever mistakenly shut down or rebooted your operation-critical server while you were willing to halt your desktop computer through ssh before going to bed, or anything like this? If so, and if you are on Debian/Ubuntu, molly-guard is designed for you: this nifty bash script gets between you and the shutdown/reboot/halt tools, checking if you are connecting through ssh and if so asking for the hostname of the machine before proceeding.

Wondering how it looks? Here is the output of a little test:

ixce@timmy:~$ sudo shutdown -r
W: molly-guard: SSH session detected!
Please type in hostname of the machine to shutdown:
Good thing I asked; I won't shutdown timmy ...

Since it doesn’t correctly handle sudo yet (actually sudo is at fault here, since it drops SSH_CONNECTION environment variable when doing its stuff), you might want to add PRETEND_SSH around the beginning of /usr/sbin/shutdown as specified on Nico “nion” Golde’s blog.

You might also want to grab the molly-guard 0.3.2 etch package I backported from sid (all I changed is downgrade debhelper build-dep version and debhelper compatibility level in debian/compat since etch only has debhelper 5 and the sid package required debhelper 6 ; this shouldn’t break anything since the newer debhelper just seems to be needed to recognize a few fields in debian/control about where the package is maintained). Sources are also available, anyway.

Thanks hr for the tip :)

April 8th, 2008 @ 22:46

This one is really interresting and raises a lot of questions. Did you know…

YouTube Preview Image

See also Did you know 2.0, an updated (with facts which were up to date in June 2007) and redesigned version of this video.

I acknowledge these videos are quite old and famous, but I couldn’t help posting them here, sorry.

April 6th, 2008 @ 22:03

Building dynamic forms with Django newforms module is quite undocumented, though it’s quite easy to do. All you need to do is to hook up the __init__ function of the form, raise the __init__ to the parent forms.Form class and then add your dynamically generated fields to self.fields dict.

Here is a quick snippet demonstrating it, which will create a form with n integer fields named from 0 to (n – 1), but you will easily be able to heavily extend it.

from django import newforms as forms
 
class MyForm (forms.Form):
 
    def __init__ (self, n, *args, **kwargs):
        forms.Form.__init__ (self, *args, **kwargs)
        for i in range (0, n):
            field = forms.IntegerField (label = "%d" % i, required = True,
                                        min_value = 0, max_value = 200)
            self.fields["%d" % i] = field
April 3rd, 2008 @ 23:26

Compiz Fusion Logo
We have just released Compiz Fusion 0.7.4, based on Compiz 0.7.4. This is a new development release, featuring a good bunch of bugfixes and a new plugin providing bicubic filtering through shaders.

The official announcement is available in Compiz Fusion Community list archives.

March 31st, 2008 @ 23:00

Bah, it took so much time to get them, while it was just a matter of finding one or two dozens of hours to make them all :)

Well, I’m too lazy to do any screenshot now, so just check them out by yourselves :)

March 9th, 2008 @ 21:01

Months ago, we were setting up Shound.org‘s VPN and we were willing to produce a good looking map of the network status. We quickly chose weathermap4rrd, the software which is usually used for that kind of purpose. However the result looked graphically a bit rough, with aliases lines and so on, so that I had to fix it. I rewrote the rendering bits of the PHP version so that they use one of the PHP Cairo wrappers.

The usual sceenshot :

weathermap4rrd+cairo sample

I bundled the whole stuff you might need to deploy it with a howto and additional infos (sorry, the docs are written in French, I will translate them when I’ll have the time to) into this tarball, or you might just grab the weathermap4rrd patch.

March 6th, 2008 @ 21:29

It’s now official, Enso, a really awesome tool that integrates smoothly into your desktop and enables you to perform several otherwise boring actions by just using your keyboard in a very simple way (check Humanized website for a better description), has just been open sourced under a BSD-like license. It’s written in Python and uses Cairo for the rendering, and the end result is really neat.
One of the great news of this is that it’s going to work on Linux (and probably even BSD’s, though it requires compositing & a compositing manager for full functionnality, which is (afaik) only available on FreeBSD) very soon :) . I’ve got it working on my laptop right now, after some python-xlib/pycairo/pygtk love ; it just now needs some more testing and polish before it goes live, but it’s gonna be great :)

Enso on Linux

Long life Enso!

March 5th, 2008 @ 20:11

Huge thanks to Novell, OpenSuse and jpr for this awesome T-Shirt :) I love it!
OpenSuse T-Shirt

Sorry, I look completely tired and I’ve got too much hair these days :p