Are there any legal concerns of publishing Open Source code in a physical or digital book sold for commercial purposes?
It could be snippets or files from a project, up to a book that is only a single project entirely, with no other purpose.
Best practices on attribution/copyrights?