All my posts on Stack Exchange sites, including all code snippets are dual licensed under:
1) cc by-sa 3.0 with attribution required (the SE default license)
2) The MIT license
You may use either license as best suits your needs. The dual licensing obviously only applies to text, code and other content of which I am the author of. Quoted content remains licensed under its original license, which by default is cc by-sa 3.0 on SE sites.