Category Archives: linux

(really) simple thread example in python

# it will calculate the md5sum of 
# all files in the arborescence

from threading import Thread
import subprocess
import os

def slowthing(i):
  cmd = ["md5sum", i]

for i,j,k in os.walk("."):
  for l in k:
    each = os.path.join(i,l)
    t = Thread(target=slowthing, args=(each,))

you can clone/download here:

homemade colored yogurt

you need:

– a yogurt-maker
– color dye and some creativity
– milk (prefer whole over skimmed)
– update, tested with 0% fat skimmed milk and good results.
– yogurt starter

use 3 or 4 drops of food dye, 15h in the yogurt maker, enjoy!







Skimmed milk works, too

#hubicfuse with #debian for busy people

Install the debian package:

apt-get install hubicfuse

Clone the project:

git clone

You will need to use one of the scripts from this project.
Or just the script hubic_token from

Create an app on hubic.
Get the client_id and client_secret.

Create a file named .hubicfuse on your ~/
execute the script hubic_token
copy the token form the script

the .hubicfuse file should look like this:


I used ssl = False to avoid issues with my auto-signed certificate.

Add your user to fuse group if you haven’t (look here).

create a mount point:

mkdir hubic

then mount:

sudo hubicfuse ~/hubic -o noauto_cache,sync_read

to umount,
fusermount -u hubic


really simple image editor for linux

Want to add a square, a line and not an expert?

Use Pinta. Problem solved.

apt-get install pinta

More here:

If anything more complicated than that (still assuming you’re not a pro), you can try rawtherapee.

Un petit script python qui m’envoie des mails quand le RER est malade

Un petit script tout moche python qui m’envoie des mails quand le RER est malade, lancé avec une crontab aux horaires qui m’intéressent, et voilà!

# -*- coding: utf-8 -*-

import time
now = time.ctime()

# RATP API part
## c'est la partie magique, merci Pierre!
import requests
r = requests.get("")
data = r.text

import json
parsed_json = json.loads(data)
if parsed_json["trafic"] == "perturbation":
  mailbody = parsed_json["perturbations"]

  ## mail part
  import subprocess
  import smtplib
  import email.utils
  from email.mime.text import MIMEText

  recipients = ","
  # Create the message
  msg = MIMEText(str(mailbody))
  msg['To'] = recipients
  msg['From'] = ""
  msg['Subject'] = "RERB status -- " + now

  server = smtplib.SMTP('')
  log = server.set_debuglevel(True) # show communication with the server
      server.sendmail(msg["From"], msg["To"].split(","), msg.as_string())

get IPs only from arp -a with #vim

arp -a

? ( at 50:b7:c3:xx:xx:xx [ether] on eth0
? ( at c8:d7:19:xx:xx:xx [ether] on eth0
? ( at  on eth0
? ( at 70:9e:29:xx:xx:xx [ether] on eth0
? ( at 9c:b6:54:xx:xx:xx [ether] on eth0
? ( at 70:9e:29:xx:xx:xx [ether] on eth0
? ( at 50:b7:c3:xx:xx:xx [ether] on eth0
? ( at b8:27:eb:xx:xx:xx [ether] on eth0
? ( at 20:e5:2a:xx:xx:xx [ether] on eth0
? ( at  on eth0
? ( at 20:4e:7f:xx:xx:xx [ether] on eth0
? ( at 34:36:3b:xx:xx:xx [ether] on eth0
? ( at 00:90:f5:xx:xx:xx [ether] on eth0
? ( at e4:e0:c5:xx:xx:xx [ether] on eth0
? ( at 6c:ad:f8:xx:xx:xx [ether] on eth0
? ( at b0:79:94:xx:xx:xx [ether] on eth0
? ( at 6c:ad:f8:xx:xx:xx [ether] on eth0

with vim: