The code examples in the book are MIT License. It's only that you can't make money from reselling the book *text* itself. You can use all of the knowledge and source code in anything you like, commercial or otherwise.
ASCIIDOC was a somewhat arbitrary choice. The goal for this project was to be able to easily generate the book in a variety of formats. Since ASCIIDOC can parse into HTML rather easily, I was then able to generate a web version of the book, a PDF for print, and ultimately I hope to be able to generate ePub and Mobi as well. LateX is a fantastic tool as well.