At my previous job I created a generic dashboard for automating tasks and it that turned out to be quite useful - and of course my previous employer owns all the code I wrote while I worked there. Now that I'm no longer there, is it legal for me to recreate that dashboard from memory and open source the code? If I do recreate it, the code (maybe 2k-3k lines) could be almost identical to the original since I have pretty good memory and tend to follow my usual coding style and naming conventions.
Edit: a little more background - this is a pretty generic piece of software that's used only internally by a small team (<10) within a global corporation. "The company" is not even aware of this system since it's I create it on my own initiative. It's built on python/django. And by almost identical I mean that for example the django models will have the same name/fields and views will use similar queries to return the same sets of objects.