This topic is for guidance only and is not authoritative. To be
sure you have the right to submit a snippet you didn't write you may need
to contact the initial author or read any license that accompanied the
snippet.
If you wrote the snippet you have the right to do as you like with it.
If you acquired the snippet from a blog post or similar, check the
posting to see if the author has placed any restrictions on use. It is
unusual for the author to assert any rights over code snippets, but they
may do.
If a snippet is in the public domain you can submit it and it is OK to
license it under the MIT License.
If you extracted a snippet from anyone's licensed source code then you
need to check the license to see if it allows the code to be distributed
and, if necessary, re-licensed.
If the author simply requires credit for his or her work then include
their name in the comments when you submit the snippet and make it clear
they need to be credited. However, if there is any requirement to
reproduce a copyright statement this cannot be met because all
snippets in the Code Snippets database are currenty released under the
copyright of the Code Snippets Database Contributors.