All code I write has some sort of license. If you are unable to locate the license for any specific piece of code, let me know so I can sort it. Unless stated otherwise, all code is distributed under the terms of Creative Commons Attribution-No Derivative Works 2.5 UK: Scotland. This license basically states that the code itself is gratis, and you may resdistribute it so long as you don't modify it and you provide adequate credit. For adequate credit, all I desire is that you provide my full name (Peter Murdoch) and that you provide a link to http://pmurdoch.com. This is usually already embedded in the code. A friendly email to let me know where my things are going would never go amiss, but it's not necessary.
The good thing about this CC license is that I can waive any condition of the license for people who want it. I might, I might not. Depends on how good a mood I'm in.
Occasionally I might release small snippets under the terms of the GNU GPL Version 3. This depends entirely on the context and quantity of code.
A full copy of my Creative Commons license of choice is available by clicking here.