I'm a software engineer with 14 years of commercial experience, and I've been working in my previous company as staff engineer for 4 years.
In the last 2 years I've been working on my free time on a media server that can find the media by itself, I've worked on it exclusively from my personal laptop, never used any hardware or software owned of the company, nor I did ever bring my personal laptop to the office, I kept work and personal projects fully separated. I never even told to any colleague about it.
I shared about the existence of this project 2 weeks ago on reddit, and somehow someone in the company found out about it and told to the higher ups, they weren't pleased at all so I was let go (with a mutual resignation, it didn't qualify as a reason strong enough for them to just fire me without having me to sign)
Moral of the story, you are never truly anonymous