Code Samples

Code Samples worth sharing.
So far, I've got a straight php code sample and Drupal focused code sample.

Take your pick:
Multi-Step Form
Object Oriented PHP
Attach an existing file to a node programmatically