Flycut is a clean and simple clipboard manager for developers. It's based on an open source app called Jumpcut.
Every time you copy a code piece, Flycut stores it in history. You can change the hotkey and other settings in preferences. Later, you can paste it using Shift-Command-V even if you have something different in your current clipboard.