If you're looking for a reference, you could do a lot worse than to start with this set of macros by Peter himself:
For more information, see the wiki Searching the Forum for Answers section.