If I've made a mistake, please ping me in chat or post something on meta. I'm receptive to criticism; it makes everyone better.
Everything I post on Stack Overflow is licensed to you under CC0:
you can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
Feel free to just throw it into your project without attribution. That's what most folks do anyway... but for my contributions, it's legal.