desgrange.net

Erlang on Mac OS X

Erlang is a very nice programming language that you can download on erlang.org. Binary packages exists for Windows, Linux distributions usually provide packages to install erlang, but on Mac OS, there is nothing.

But erlang works nicely on Mac OS, you just have to install it from sources and it's pretty straightforward.

  • Install XCode (from App Store), it contains all rquired tools to build erlang.
  • Download erlang source code (currently otp_src_R15B01.tar.zip) from erlang.org.
  • Open a terminal and go in the directory where you downloaded the file.
$ unzip otp_src_R15B01.tar.zip
$ tar -xvf otp_src_R15B01.tar
$ cd otp_src_R15B01
$ ./configure
$ make
$ sudo make install

That's all. You can check that erlang is working on your computer by launching an erlang console:

$ erl
Erlang R15B01 (erts-5.9.1) [source] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
1> 

Mac OS Time Machine Local Backups

In Mac OS Lion, Time Machine brought a new feature: local backups. If you are using Lion on a laptop and your Time Machine is on an external drive, this feature is enabled.

What this feature does is to do backups even when not connected to the backup volume. All backups are written inside /.MobileBackups.

When you start Time Machine client, on the time scale on the right, the white backups are local backups while the pink ones are your regular external backups.

This feature is quite cool but a bit annoying when your drive is full. To disable it, run the following command in a terminal:

$ sudo tmutil disablelocal

This will stop Time Machine local backups feature and remove all local backups.

If you want to enable it back:

$ sudo tmutil enablelocal

SNCF oui oui, c'est possible

…d'être aussi con.

Aujourd'hui je reçois une newsletter de la part de la SNCF, bizarrement je ne me souviens pas m'être inscrit à une quelconque newsletter. Donc premier point :

  • L'opt-out est interdit en France.

Quoi qu'il en soit, je clique sur le lien pour me désinscrire (situé tout en bas du mail et écrit en tout petit en gris clair sur gris un peu plus clair (mais ça on a l'habitude)).

SNCF newsletter

Et là j'arrive sur une page de désinscription qui me demande mon adresse email (pré-remplie), mon numéro de carte de fidélité S'Miles (ha bon, j'ai ça moi ? je suis pas au courant, heureusement c'est pré-rempli) et ma date de naissance… Pourquoi pas ma couleur de cheveux aussi et mon choix de vote pour dimanche ?

Je rempli donc ce dernier champ et valide.

SNCF désinscription

Et oui, le numéro de carte S'Miles n'est pas bon (il me semblait bien que je n'en avais pas).

Bref, la SNCF égale à elle même… EPIC FAIL.

Jekyll

I'm in the process of moving my blog from WordPress to Jekyll (everything still hosted on my server).

It's far for being finished yet but I already moved some posts. Given the nature of Jekyll there are no comments for the moment, I will think how I could add that later.

Please update your RSS/Atom feeds :-).

FOSDEM 2012

For the 3rd year in a row:

FOSDEM

Lost in Tōkyō

Lost in Tokyo from Mark Bramley on Vimeo.

Don't upgrade specific packages

From time to time I don't want to upgrade some packages on my debian server (because there is a bug with the new version or some other reasons) but I still want to do the other updates.

APT is able to handle that but it's not really easy to do (and to remember). There is a utility called wajig that simplify that a lot (wajig aim is to do all the package handling stuff simpler than apt and dpkg).

Install wajig as usual:

$ sudo apt-get install wajig

And here is how to use it for holding a package, unholding it or list all packages that are on hold:

$ sudo wajig hold
$ sudo wajig unhold
$ sudo wajig list-hold

Obsolescence programmée

Ubuntu Cola

I ate in a place where they sell Ubuntu Cola! Not related at all with Ubuntu OS, except for the name (and its meaning).

Ubuntu Cola

I usually don't drink cola drinks, so to me it tastes like any other cola. But it's a fair trade product, so why not drinking Ubuntu Cola instead of big corporations ones?

Multiple identities in Apple Mail 5

N.B.: This is a "reminder post" to remind myself how to do that in the future, see links at the bottom for sources.

If you have email address aliases you might want to configure them in Apple Mail so you can also use the aliases to send emails. There are two ways of doing so.

Simple and easy but incomplete solution

It's not intuitive since it's not explained in Mail interface, but you can simply do that by writting several email addresses in the "Email Address" field of your account information. You just need to separate them with comma:

Mail config

Then when you write an email, you can select your new identity:

Mail write

A bit more complicated but complete solution

But as you can see in the previous method, what you entered in "Full Name" field is used for all identities and the purpose of having several identities may be to have also different full names.

In the folder ~/Library/Mail/V2/MailData, there is a file named Accounts.plist. Close Mail, open the file (with Xcode for instance) and in the element MailAccounts/Item X (replace X with the number corresponding to the email account you want to add an alias to) add "EmailAliases" array with dictionaries containing your new aliases :

Mail accounts

Now when you write an email, the name you put is used:

Mail write

Sources