This is why all my projects are published under a non-commercial-use-only license. Hobbyists are free to use it, but companies need to contact me to license and pay for using my code. Makes me very good money, and my code is still out there for free for hobbyists to use.