Gnurou's blog

Checking a new hard drive is safe under Linux

My 250Gb external hard drive (a Seagate Barraccuda, which I was expecting to last at least for many years) just died a couple of days ago after less than two years of service. No matter the reputation of the manufacturer, hard drive failures can happen any time, so it's better to be prepared and not rely on only one storage for your important data. Fortunately, that was my case and nothing critical has been lost in the process.

Well anyway, now I just bought a new, 500Gb Western Digital Caviar drive, and the first thing I want to be sure about is that it is safe to store things on it. So, before even creating a new partition, let's make a complete surface check with badblocks!

Comparing Google Video, Vimeo and Blip.tv

Lately I have been trying videoblogging on my blog in Japan, namely sequences of 15-20 minutes. I required good video quality because showing the landscape/events were important to me. Due to bandwidth limitations, I cannot host the videos myself, so I had to look for a video hosting service. The video service of my dream would :

Écrire en japonais/coréen/chinois sous Kubuntu Dapper/Edgy/Feisty/Gutsy

L'entrée de caractères asiatiques a toujours été une galère sous Linux. Heureusement la situation tend à s'améliorer un peu, bien que l'on soit encore loin du tout fonctionnel. Voici comment je suis parvenu à avoir le support pour l'écriture en japonais sous Kubuntu Dapper (6.06), Edgy (6.10) et maintenant Feisty (7.04), avec SCIM et Anthy.

How to fix the bad resolution of Sanyo Xacti videos

Sanyo Xacti C5During my latest trip to Japan, I bought a Sanyo Xacti C5 camera. This hybrid digicam/videocam device is rather honest, and what I especially liked was that it directly records videos in Mpeg 4 format. Pretty nice, that you can save almost 1 hour of quality video on a 1 Gb flash!

However, I quickly noticed that something sucked about it. When I wanted to watch my recorded videos on my PC, I could only see the top-left corner of the video. Although the device records videos in 640x480, mplayer, xine, or vlc would invariably show me a 320x240-sized window with only the top-left part. Only ffplay would play them correctly (but without sound). I know my videos sucks, but this way they suck even more now.

It is no surprise that the feature is actually a bug: for unknown reasons, the video size is not correctly written in the MP4 file (it seems the Olympus C-770 is also affected). So, here is how to fix it. I have found two ways, one bad, one better.

How to create ebooks with Linux

The numerical age has brought us new ways to preserve information. By allowing infinite copies of the same quality as the original, and to concentrate large amounts of data on tiny devices, electronic documents are clearly the way to go if you want to keep a book forever.

Shitty Query Language

Any person who tried to write SQL code that is compatible across different databases probably had to renounce after going beyond simple "select" statements. Recently we have been trying to support both sqlite and MySQL for gwtd and it's amazing how awfully un-standardized SQL is. It's really a shame to have to write another abstraction layer because one database recognizes AUTO_INCREMENT and another AUTOINCREMENT. So it's no surprise to see that the "Shitty" denomination is actually recognized by search engines:

Termes anglais pour les caractères utilisés en programmation

Expliquer un bout de code à un anglophone, voilà une épreuve qui peut s'avérer pénible pour un français. Particulièrement quand on doit faire passer des mots tels que "Accolade ouvrante", "Flèche" (pour déréférencer un pointeur) ou "Point virgule". Voici la liste des termes anglais les plus fréquemment employés pour la ponctuation utilisée en programmation (le langage de référence est C). Chaque fois qu'une version abbrégée existe, elle est donnée entre parenthèses. Un clic sur le caractère vous amènera vers sa description complète sur Foldoc.org (quand elle existe) où vous pourrez trouver d'autres termes employés.

Picard 0.7 on Ubuntu Edgy

Update: There are now official packages for Edgy . Therefore, this post and its content are now obsolete.

 

Picard is a great tool that automagically tags music files (be them mp3 or oggs) using an acoustic fingerprint and the big Musicbrainz database. It's as easy to use as dropping music files and letting it do the work. And it's especially great if you are a Last.fm user and want your files correctly tagged.

How to make yoghurt with your server

If you own a personal server, you are probably using it to perform many useful things: fetching your mails, hosting your personal web pages, connecting your local network to the internet, ... Now, you can also take advantage of its heat to make your own yoghurt.

Light i18n with Drupal

Running a multilingual site can be a real pain, depending on what you exactly want to obtain. Drupal comes with an internationalization module that does a real good job on most cases. However, mine didn't fit within its features. Some of my content is written in English, other in French — exclusively. There is no use to translate every page to both languages.

What bothers me more in the current i18n module is that it always prefixes all your local URLs with the current language. That is, instead of having '/my/node', you'd have '/en/my/node' or '/fr/my/node'. This is not really serious by itself, but I started worrying when I realized that pages without any translation were both available under '/en/' and '/fr/', and that the only difference between the two versions was the language of Drupal's user interface. Having the same content referenced under different URLs is not a clean design to me, and it becomes objectively very bad when it comes to Search Engine Optimization.

Syndicate content