Code shared without a license (or really anything you make) is considered copyrighted automatically. Unless it specifically states a license, it is not public domain because it is on a forum. However, in most cases, I doubt any random forum poster will sue you. Though it might be a good idea to PM the author and ask.