Some scripts for practice and practical purposes. (Some of these can be accomplished with simple shell scripts and one-liners, obviously. But that wouldn't be any fun.)
Use this script to bring a window to the forefront.
Example: emacs gets buried in a pile of windows, assign a shortcut that activates any visible instances of it.