My job has me working with SQL pretty much all day long in both OLTP and OLAP situations but occasionally I will work with other code too. I started having issues with "I'm pretty sure I've done something like this before" but working with our ticket system doesn't really work well for finding past solutions so I started keeping track of everything I've done. Of course I google things but too often I am working with something that I've worked with before so that doesn't always help. Google: making people in IT look smart for years.
I started out using a software called Source Code library and although I like it, there were some issues. I would give you all the web site but it has gone out of business with the last update coming way back in 2011. It still has a great interface and I purchased it before it went away. I have the portable version that I could zip up and put on my website. Yes it is portable but I wanted to store more information and the best way would be to zip up the whole folder.
Another one that I tried is called WhizFolders http://whizfolders.com/ but I think that it too has gone out of business. It also has a good interface but portability was a bit of an issue. I do keep my data file on a google drive folder but that was getting a bit kludgy
But the one that I ended up using most of the time is still in development called Library.NET. Although it has perhaps the ugliest interface out of anything that I have worked with, I can store an endless amount of data since it uses MS-SQL server to hold all of the data and I do have thousand of solutions that I've worked on through the years. I can quickly search through everything that I've done in the past. https://fishcodelib.com/ It does allow for code syntax coloring like the others and allows me to keep notes as well as spreadsheets and word documents or any other kind of files. But dang, it is kind of ugly
I also thought about turning my own web page into more of a wikipedia for my own use but didn't want to a possible security issue since I work quite a bit with financial information at work. At work we are moving from an SVN solution to a Microsoft TFS solution but I really have no need to share most of my code with that with the exception when I'm changing a stored procedure that will be used in production.
How do you all keep track of projects and code?