Convert Video (avi) or Audio (mp3) to .3g2 for the Samsung Exclaim

The Samsung Exclaim™ requires the 3g2 format for its ringtones or even videos. This is a format that is optimized for 3G phones. Fortunately on Linux, FFmpeg is a very complete tool to work with audio and video formats and convert between them, and it can, of course, generate 3g2 files.

If you have compiled and installed the right packages (Medibuntu repository with the libaac support, for example), you can easily do one of these commands with ffmpeg:

Continue reading “Convert Video (avi) or Audio (mp3) to .3g2 for the Samsung Exclaim”

diff and ignoring spaces and end of lines (unix, dos EOL)

Possibly you will need to either do a diff between files where they don’t use the same new line character.

Because the new line character is OS-dependant, there are issues when doing a diff on these files when you are not using that same OS.
And there are also times where you just want diff to ignore all spaces and new lines…

The –ignore-all-space option for diff is really useful in these two cases. It will check for differences between the given files ignoring spaces or new lines whether there is none, one or more

Continue reading “diff and ignoring spaces and end of lines (unix, dos EOL)”

Colored Man Pages

You certainly know that manpages tend to be very long and boring to read , especially without any colors at all.

You can easily get colored manpages with just one copy&paste into your .bashrc!

Follow this link to Linuxtidbits’ post about “Less Colors For Manpages” and you’ll know how to make it happen!

Colored Manpage

Script to capture a screenshot (with Chromium) (Command-line)


I wanted to take screenshots of about 15 Websites, but didn’t want to install any plugins as I wouldn’t use them often. I saw a lot of how-to’s using import from Imagemagick but they capture the whole screen, not clearly what I was looking for.

Using chromium, xwininfo (from X) and import, I made this bash script which captures only the webpage. See below for the Source code.

Continue reading “Script to capture a screenshot (with Chromium) (Command-line)”

Piwik Web Analytics – A very good open source alternative to Google Analytics

Piwik is an open source, licensed under GPL, web analytics tool that uses PHP and MySQL. Piwik aims to be an open source alternative to Google Analytics.

The installation process is very easy to follow. To collect information, you just need to add your site to your Piwik installation then add the given Javascript code before the </body> of the site and you’re all set!

It gives interesting reports on your website visitors, your popular pages, the search engines keywords they used, the language they speak… and so much more.
Because Piwik has been built on the top of APIs, all the data is available through simple to use APIs. All features in Piwik are built inside plugins: you can download new plugins, and easily build your own. The user interface is fully customizable and light speed.

You can try out the Piwik online demo which will show you all the features and see if you like it or not.

I think this is far better than Google Analytics in the sense that:

  • You keep your data on your own server.
  • You can use the API to show stats on your websites.
  • It’s FREE both as in free speech and as in free beer.
  • If you know PHP, you can tweak it as you wish
  • You can host as many websites as you like! You can offer web stats to your friends and families!
  • It’s been elected SourceForge project of the month!

Easy Apache log statistics using Visitors

There are many Apache log analyzers that you can now choose from, but it can be long or confusing to install most of them. I wanted to try and find a simple log analyzer that just does its work using cronjobs. Visitors seems to fit the needs!
We’ll also use ip2host to resolve the IP addresses into domain names.
All of this will be run daily by a cronjob.

Screenshot of a report generated by Visitors
Screenshot of a report generated by Visitors

Continue reading “Easy Apache log statistics using Visitors”

Electro Collection #1 – An electro-flow of music


Here’s a collection of electro/electronica songs (as mp3) I like and that are free and libre. I’ll just call this collection “Electro Collection #1”!

I’ve picked these songs because they each contain a unique melody and they are easy to listen even for those who might think they don’t like electro music. Really, listen to the first three songs (though you should listen to them all) and see! I’m sure you’ll find one that you like!
They almost all have the same genres. Mostly, it is: Electro/Electronica, Dance, Experimental.

[mp3fp: Collection 1/01 – Ambient Voyager.mp3,01 – Ambient Voyager| Collection 1/02 – Jolie Micro Girl.mp3,02 – Jolie Micro Girl| Collection 1/03 – Wankash.mp3,03 – Wankash| Collection 1/04 – Struttin’.mp3,04 – Struttin’| Collection 1/05 – dub is dumb.mp3,05 – dub is dumb| Collection 1/06 – Chips dreams.mp3,06 – Chips dreams| Collection 1/07 – maska %26 goey.mp3,07 – maska %26 goey| Collection 1/08 – dry martini.mp3,08 – dry martini| Collection 1/09 – Flocon.mp3,09 – Flocon| Collection 1/10 – Sun System.mp3,10 – Sun System| Collection 1/11 – The sun is coming.mp3,11 – The sun is coming| Collection 1/12 – Inside the light.mp3,12 – Inside the light| Collection 1/13 – Plume.mp3,13 – Plume| Collection 1/14 – don’t be shad.mp3,14 – don’t be shad| Collection 1/15 – The Creature.mp3,15 – The Creature| Collection 1/16 – Emptiness.mp3,16 – Emptiness| Collection 1/17 – Pour Toi.mp3,17 – Pour Toi| Collection 1/18 – m%2B.mp3,18 – m%2B| Collection 1/19 – Le nettoyeur.mp3,19 – Le nettoyeur#w=400]

If I had to pick favorite ones among these, they would be (as unsorted list):
02 – Jolie Micro Girl
04 – Struttin
05 – dub is dumb
06 – Chips dreams
11 – The sun is coming
13 – Plume
14 – don’t be shad
17 – Pour toi

Note that this is not an album. Each song in this collection has its own copyright, copyright holder(s), and license. The songs are in their entirety in unmodified form and are seperate and independent works in themselves. See below for copyrights/licenses.


Tarball containing all the songs: electro-collection-1.tar.gz (~97Mb)
Download each song separately from:
HTTP: Here
FTP: Here or connect using a FTP client to on port 21 as anonymous.

Licenses and Copyrights

Licenses and copyrights are downloadable from here and are also listed below:
Continue reading “Electro Collection #1 – An electro-flow of music”

[Ubuntu] Byobu: a very useful enhancement for GNU Screen

I’m now using Byobu (earlier known as screen-profiles, but changed to Byobu) everytime I ssh into one of my servers:

[local]$ ssh myserver
Last login: Thu Aug 13 11:03:58 2009 from ...
[remote]$ byobu -R


Byobu can be seen as a replacement for the “screen” command, though it is not really a replacement; It should be seen much like an addon or a plugin. It can also be used locally without ssh (I just find it useful with ssh). It shows very useful information (about the computer where screen/byobu is running) and acts just like screen, same commands (though it adds some more keybindings). See screenshot above.
Continue reading “[Ubuntu] Byobu: a very useful enhancement for GNU Screen”

[ubuntu] Smasher 1.1.1 deb package for Jaunty

Smasher is an easy to use and lightweight audio loop slicer for Linux and Windows. I decided I would give it a try and that I should package it for Ubuntu (see Download section below).

It might need a little time before you figure out how this thing works. First you need to understand the Patterns (upper-right part); Smasher divided the file you’ve given him into slices, and each slice gets a number and that’s the numbers you see on the left. From there, you can select in which order to play the slices.
Below the pattern area, there is the effects area, that’s where you can apply an effect to each slice (first column for first slice being played). Then it is very easy to understand the rest of how it works.

Important: Smasher doesn’t seem to support (or struggles with) files that are relatively big. I suggest you stick with mp3’s that are less than 1mb, or Wav files are less than 2 or 3mb. Otherwise you’ll see your Ram memory go up and your computer will start freezing.

Here are some of the features it offers (from official website):

  • slice loops in seconds
  • load MP3, WAV, FLAC and AIFF
  • save as WAV
  • resonant filters
  • effects
  • share presets online
  • sample packs
  • free and open source

Continue reading “[ubuntu] Smasher 1.1.1 deb package for Jaunty”