Do whatever you want with this code. I only ask that you check out Dash, my Snippet Manager and Documentation Browser app.
Custom NSWindow which behaves like a regular titled window (and is actually a titled window), but looks and behaves like a borderless window.
The goal was to end up with a borderless window which can be resized from all 4 edges, like a regular window.
Warning: I have no idea how reliable this is, only barely tested it on OS X 10.8. This will be used as a new HUD style for Dash.