https://gist.github.com/jonashansen229/4534794 https://gist.github.com/skhani/5aebd11015881fb3d288