@dbu here my original proposition: https://gist.github.com/rande/b53f9a987170460207c1 - @nicolas-bastien does not seem to like it.