Shameless copy and paste from samrat's code

See: https://github.com/samrat/happy-dashboard