Borne of this discussion: https://news.ycombinator.com/item?id=6852770 Feel free to use, modify, adapt however you wish. MIT license.