Code I provide in my answers is free to reuse for any purpose, including in commercial, closed-source software (though it's usually client-side JavaScript so good luck hiding the source ;)). Attribution is appreciated, of course.