First off, I'd like to say that I posted this in the Scripts section, and I'd rather the script be here and not in the scripts section, seeing that its simply a snippet.
Anyhow, as the script says,
This is a public code snippet repository. Share your snippets with other developers to gain valuable feedback. Tag your snippets with keywords to make them easy to find.