Note: working on the side is not drawing multiple FTE salaries... but actual work outside business hours.
Again, it depends on the work environment. I haven't had trouble getting permission when I've wanted/needed it. It's generally if your job performance is suffering, or if you are working in an adjacent or competing market.
You've specifically mentioned two things I believe I excluded in my statement.
I’ve done both with no issues.
If it’s green lights everywhere I will advise you to have another GitHub account than your professional one. And makes everything as separate as possible.
At the one I am at now, you can get a written sign off from legal before you even start your side project, where they agree that all rights to the side project belong to you. You have to apply for each project individually, but the form is online, just a few fields, and is commonly approved (as long as it isnt a legitimate conflict of interest). I don't mind the process, because each time it nets me an official signed paper that explicitly states that my employer has no rights to my side project.
Rule #1: don't listen to sweeping statements about law on HN.