Hey everyone! I'm curious about how you store your reusable code snippets. If you're part of a team, how do you manage and share these snippets effectively?
5 Answers
I store my personal scripts in `~/scripts`, and I make sure they're tailored for different distros. When I set up a new system, I run a script called 'Nix2Git' that symlinks all my important stuff to make everything uniform across my devices.
I usually drop my functions in the `~/.functions` directory and scripts in `~/.scripts`, depending on their usage. Compiled binaries get stored in `~/.local/bin`, and I have a `~/.aliases` file to keep my bashrc tidy. Makes managing everything much easier!
Yep, I do the exact same thing with my scripts!
If you're looking for something community-driven, check out 'pet snippets' on GitHub. I've been using it for a while. It’s simple and very handy!
At work, I use Confluence to keep everything organized. At home, I have a Mediawiki instance running on Docker. Plus, I maintain a personal Git repository for my dotfiles like vim and tmux configurations.
All my scripts go to `~/bin`, which is in my PATH. I keep saying I'll turn it into a Git repository and track changes more effectively, but I haven't gotten around to it yet.
Same here! This setup works like a charm.