I meant something like this: https://gist.github.com/danberindei/8917910