> Their employment contract for-sure states they own any work produced by you during your employment, and you agreed to this.
There are many open legal questions as to where this line is drawn. Surely the line falls somewhere between "every character I've ever typed on a keyboard" and "the verbatim code". I personally don't think he's crossed it. IP ownership is much more complex than portrayed in HBO's Silicon Valley. That is my opinion.
Furthermore, when I worked at GitHub (now acquired by Microsoft, so I'm sure things have changed drastically) -- there were very lax IP ownership agreements in the employment contracts around code ownership, because the legal department was worried that if found in any way conflicting with California law it would render the entire IP claims null and void (which does have precedent in California).
The point is we don't know, and I think OP would know better than us if it was disallowed or not.