I wrote some code that I'd like to publish on my website. I'd like to allow people to use the code freely in whatever way they choose, but I'd want them to leave a header at the top of each source file intact - just basically so I get credit for writing it. Something like:
Author: John Doe
This software may be used for any purpose, so long as this original header is left intact.
Oh and you can't sue me if any of the code does something bad.
I guess something like that. Is there any guideline on how to write that?