Wow, man. That is a harsh reality.
I've been burned before, too, long ago. Use this episode as your reminder in the future to follow a simple rule: check your code in. Always and forever, no exceptions. Following this rule has saved my butt more times than I can count.
This saves you from more than just random deletion or failed hard drives. Maybe you stay up all night rewriting a core system thinking you're the next Donald Knuth or John Carmack because your code is SO BRILLIANT - only a few "minor issues" that you'll fix next session. But when you drag your groggy ass back to the keyboard with the benefit of some sleep you realize your code will never work - there's a reason nobody has done it this way before and it's obvious now in the clear light of day. Ah well, an unfortunate waste of time but at least it's easily undone. Without source control your embarrassment would be compounded by another whole day of backing our your changes and the fixes all the defects that come from it.
So... if you aren't set up to check in your code, fix that first before you do anything else. It used to be harder. Nowadays source control is so excellent and effortless (and usually free!) that you really never have an excuse not to use it.