But isn't a demo or example code exactly the kind of thing one might want to disclaim liability for?
Whether something like this is even copyrightable is questionable. But releasing it under a license like MIT-0 removes any ambiguity -- whether it's copyrightable or not, the original author is allowing you to use it for anything at all, no strings attached.