When I was first started my career I was working at a small software company. I spent my evening and weekends building tools and plugins to optimize my workflow and I quickly became 10x more productive than my coworkers. I shared my tools with the company and in return, I was rewarded with raises year after year. I went from 30k to 80k[0] in 3 years. Now I work for a large software company and the same tactics haven't worked out in my favor so I just keep everything to myself. In my experience not only did I continuously get paid more but everything I wrote was FOSS so it helped improve my portfolio. The catch is you gotta work for great people, and that's hard to find.
[0] Almost double the median household income for my area.
[0] Almost double the median household income for my area.