Base post from the gist version

https://gist.github.com/madx/0930b1089379920d89d6