As long as you control the copyright of your code you can use it as a code sample. You can also use open source code as long as you credit the original authors.
Are there any licensing rules regarding code samples I include in my book?

Written by Leanpub Support
Updated over 3 years ago