This is another gist

That would be a script