"However, this is code I wrote in my free time and I am rather unwilling to give it away without any benefit."
Good luck with that. You just posted that you came up with an idea directly related to your job. Your employer will most likely block you from making it commercially available and claimnit as their own. Even if you offer to let your company use it, they likely won't reward you more than a pat on the back and a gift card or trinket.
Basically, nothing beneficial will come of this. The best you can do is let your manager know about this code and that they can use it and hope the other people aren't too pissed.