PDFs and reference material not written by me is stored in mendeley/zotero (I'm using both right now) so it's easily cross referenced and text searchable across my devices and I'll have my reference material at any job I go to. My background is engineering not research but when I discovered these tools my note taking/referencing skyrocketed. I put every worthwhile pdf I find in it. I've begun following a lot more research/science types lately to learn their systems because it's stuff I never really encountered on this end of tech.
Code is in ~/workspace which is typically ~/workspace/$company/$github-repos
My markdown docs (snippets, research) are in ~/workspace/docs/$whatimresearching
I do everything out of my workspace. This lowers the amount of cruft I have to move between systems when migrating. Mostly dotfiles and ~/workspace and I'm good to go. And I keep offline backups of course.
Code is in ~/workspace which is typically ~/workspace/$company/$github-repos
My markdown docs (snippets, research) are in ~/workspace/docs/$whatimresearching
I do everything out of my workspace. This lowers the amount of cruft I have to move between systems when migrating. Mostly dotfiles and ~/workspace and I'm good to go. And I keep offline backups of course.