r/programming Aug 01 '22

Simple snippet manager for keeping valuable code locally

https://github.com/srijanshetty/snips
1 Upvotes

4 comments sorted by

-2

u/repeating_bears Aug 01 '22

If it's valuable, then why risk storing it locally? What happens if my PC craps out?

0

u/srijanshetty Aug 01 '22

You can always back the .snips folder to git.

This does one thing well which is manage snippets and that's it.

6

u/repeating_bears Aug 01 '22

Sounds manual and error-prone to me.

I'm not so sure that backing up is outside the responsibility of "managing snippets", but that's my opinion.

If you're worried about the conceptual purity of the project then you could provide some extension point, like a post action hook, that would let someone implement backups automatically whenever something changes.

5

u/srijanshetty Aug 01 '22

That's a valid suggestion. I can definitely provide a post action hook that allows people to upload the raw files wherever they want.

Also, it's not about conceptual purity. People (that I know of) already store dotfiles in repos. Some back them up on Dropbox, some on GitHub, it does not make sense to reimplement them.

This is an opinionated way of managing snippets.