Archive for the ‘/dev/null’ Category

Compact VirtualBox disk images

Tuesday, February 9th, 2010

I’m using VirtualBox since a couple of years to run Windows on top of my Linux boxes. After a while, the virtual disk size may increase to unreasonable sizes and I was searching for an option to “compact” it like in Parallels/VMWare.

Contrary to these other virtualization tools, there is nothing in VirtualBox’ GUI to do this. Fortunately, you can use 2 tools to achieve the same goal…

First, you need to download SDelete from Microsoft and run it in the VM:

sdelete -c

Now stop the VM and compact the disk:

VBoxManage modifyhd blah.vdi --compact

That’s it, your disk is now compacted and you have probably gained a couple of GB!

Motorola Droid/Milestone works on Fedora

Thursday, January 21st, 2010

Today, we received a bunch of Android-based phones at work, amongst them a Motorola Droid/Milestone. I quickly tried to connect it to my Fedora 12 box and fired up Banshee. As you can see on the screenshot below, it was perfectly recognized without any intervention and I could synchronize my music library to it :)

I’m fed up of companies not delivering products (yes, you Nokia!)

Tuesday, January 12th, 2010

Ok, this is a pure rage rant. I’m really sick of companies paper launching products that are totally unavailable to customers for months. Last November I made a blogpost about the Nokia N900, which I finally ordered. On the paper it’s still the best Linux-based phone which has the greatest compatibility with my Fedora boxes.

Today I received an e-mail telling me that my N900 would probably be delivered mid-February. That would be almost 3 months since I paid and of course you don’t get any money back on the price drop that occurs during this period…how screwed is that? It wasn’t even a pre-order, the N900 was “available”. Nokia, if you can’t deliver a product to your customers, fucking don’t sell it if you have no stock! I’m so fed up of these lousy business practices.

Nokia are not the only to blame, nVidia and ATI behave exactly the same when they launch new lines of graphic cards. Whose fault is it? The marketing guys? I honestly don’t see how generating hype on a product and not delivering it for months will help you. All you gain are angry customers who lost money on pre-orders and all the buzz effect is gone once the product really hits the streets. Great job!

On the other hand you have Apple, they have a sense on how to deliver products to the market. When a product is announced, it’s available. Guess what? They are doing fine.

Bash script to backup every MySQL database to separate files

Thursday, January 7th, 2010

To backup MySQL databases, there is the well known and handy executable called mysqldump. It has one big shortcoming though, you can either backup one database to a file or all databases to one giant file with the “–all-databases” option but you can’t backup every database to separate dump files.

(more…)

Send an SMS when hitting a certain priority level in RequestTracker

Wednesday, January 6th, 2010

RequestTracker is a widely used tool in many companies as it allows one to implement an effective workflow to handle any kind of events: customer requests, bug resolution etc…the requests are all filed as tickets to be resolved and put into queues.

RT also has a notion of priority levels for tickets, ranging from 0 to 100 and it supports scripting to automate some tasks. RT does a lot of things actually, but it’s a bit of a scary beast at first, with a not-so-clear documentation.

(more…)

Maemo or Android, N900 versus Hero

Sunday, November 22nd, 2009

Until recently, I couldn’t care less about shiny new mobile phones. When mine broke or it was time to change to a new one due to my mobile operator contract ending, I simply went for the “free” phones that were somewhat compatible with Linux. My current phone, a Nokia 5310, can for example serve as a modem in Fedora vie USB connection or Bluetooth thanks to NetworkManager and it perfectly synchronizes with Banshee for my music and podcasts.  It’s just slow as hell, but that’s another story.

(more…)

Catchall maintenance page with Apache

Friday, October 23rd, 2009

Today I had to search quite a long time how to use Apache’s mod_rewrite to create a “maintenance” page for a web server. The goal was to:

  • Redirect all URLs usually going to http://foo/go/bar to http://foo/maintenance-light.html
  • Redirect all other URLs to http://foo/maintenance.html

All the maintenance pages are also using some CSS and images. Creating this redirection sounds really stupid and simple, but one thing wasn’t clear in the documentation and it took me quite a while to figure it out…every RewriteCond is only valid until the next RewriteRule! Not knowing that, I had infinite loops on the second RewriteRule…so I hope that this post will help someone else to avoid this problem.

The lines to add to your Apache config are:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/maintenance.html$
RewriteCond %{REQUEST_URI} !^/maintenance-light.html$
RewriteCond %{REQUEST_URI} !/img/(.*)$
RewriteCond %{REQUEST_URI} !/css/(.*)$
RewriteRule ^/go/ /maintenance-light.html [R,L]
RewriteCond %{REQUEST_URI} !^/maintenance.html$
RewriteCond %{REQUEST_URI} !^/maintenance-light.html$
RewriteCond %{REQUEST_URI} !/css/(.*)$
RewriteCond %{REQUEST_URI} !/img/(.*)$
RewriteRule $ /maintenance.html [R,L]

The first line is there to simply enable the Apache rewrite engine. Then we have 4 lines to “exclude” some paths from being rewritten and finally we find the rewrite rule. Note that they are processed in order. The “L” flag instructs Apache to skip all the following RewriteRule statements as soon as the one is matched.

Quake Live available for Linux and OSX

Thursday, August 20th, 2009

Good news! Quake Live is available for Linux and OSX since yesterday. For those who don’t know what it is, imagine Quake III playable in your browser with a simple Firefox/Safari plugin. Oh, and it’s free too. http://www.quakelive.com

Générateur de persos pour le JDR Cthulhu

Sunday, July 12th, 2009

Étant MJ pour le jeu de rôles “Cthulhu” publié par le 7ème cercle, j’ai profité d’un moment perdu pour mettre à jour mon générateur de fiches de personnages. Il s’agit d’une interface web toute simple permettant de rapidement créer une fiche d’investigateur au format pdf, prête à être imprimée…idéal quand vous avez des joueurs qui ne préparent jamais rien à l’avance et ne se souviennent jamais des règles!

Le tout est fait de telle sorte qu’il n’y ait pas besoin du livre de règles, tout est guidé de manière dynamique au fur et à mesure des différentes étapes de la création des persos. Notez qu’il n’y a pas de contrôle contre la “triche”, mais bon en a-t-on vraiment besoin…j’ajouterai peut-être un javascript pour ça un jour. Donc en résumé on a:

  • Support de toutes les professions du livre de base ainsi que de l’extension “Aventures Extraordinaires”.
  • Support du jeu en mode “puriste” ou “pulp”.
  • Support d’un nombre de joueurs aléatoire.
  • Export de feuille de personnage pré-remplie au format PDF.

Le générateur dans sa version 1.1 est accessible sur par ici pour les intéressés. Ça a peut-être l’air con comme-ça, mais derrière il y a une base de données d’environ 1500 enregistrements afin de gérer toutes les combinaisons.

cthulhu

Damn, I bought a Foxconn R10-S3 Atom PC

Friday, July 10th, 2009

NEVER! I swore to myself that I would never buy one of these crappy, under performing Atom based computers. This was before I went to my local computer shop. They currently have really cheap and small Atom computers on sale, so I bought a complete Foxconn R10-S3 for around 120€. I already had a hard drive (500GB) and a memory stick (2GB) lying around, so it was a good opportunity to build a cheap computer to test Rawhide builds.

dscn2704

As you can see on the picture above, it’s a really small case in which you can fit an optical drive and 2 3.5″ disks. The whole thing is based on an Atom 330, which is a dual-core CPU running at 1.6GHz. As a desktop chip, it supports the 64-Bit instruction set. So I installed a 64-Bit Fedora 11 on it and I have to say that it works quite well…It’s perfectly usable to browse the web (even with Flash), listen to music and work on an OpenOffce document at the same time. Don’t expect much more as it will begin to feel sluggish…

One thing I don’t like about it is the integrated fan…it’s loud. In fact it’s as loud as my quad-core computer when it’s idle, which frankly sucks on a small computer.