Source code: https://github.com/chi-feng/mcmc-demo/blob/master/algorithms...
It also has visualizations for other flavors of Hamiltonian Monte Carlo, including the No-U-Turn Sampler (NUTS) used by Stan.