Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you store your personal snippets database in order to use it everywhere (work, etc)? [closed]

I've read the several discussions about storing code snippets but I did't find the info that I'm looking for, so let's define it:

  • At home, I have several side projects, most of them quite small, one large, and numerous little examples that demonstrate a specific language feature (for example, some template trick in C++).
  • Since I think that these examples will be useful to be available when I'm at work for a reference instead of trying to remember the exact details of this or that particular snippet that was tried and worked at home, I want to have it available for example on a USB flash drive.
  • The problem is that most of the snippets/small programs/examples are organized, written, compiled and tested in Visual Studio, it will be duplication if I have to put them in some code snippet organizer application. I can copy to the flash drive the source of the Visual Studio solution with all the examples, but it is not so convenient for searching compared with a dedicated snippet repository organizer. Or maybe I can change this if I write better comments and description of the examples, and that will do the job.

Any ideas, best practices, solutions, and experience with similar stuff are appreciated.

like image 893
Singulus Avatar asked Nov 27 '08 23:11

Singulus


People also ask

How do you store snippets?

There are various ways you can store a code snippet, either by keeping it in a GitHub repository or can use a smart code snippet manager, like Codiga's Coding Assistant. Coding Assistant allows you to store and reuse code snippets.

What is the best way to share a long SQL code snippets with another developer?

One of the simplest methods of sharing snippets within a team is to change the location of Prompt's snippet folder to be a network share (one that, ideally, is regularly backed up).

How do you use a snippet?

You can also insert a snippet when logging an activity or leaving a comment on a record using the HubSpot mobile app for Android. There are two ways to add a snippet: Type the # symbol into the text editor. Start typing the snippet shortcut, then select the snippet from the dropdown menu.


1 Answers

I keep everything in a source control repository, indexed by language. As I learn new languages, I translate some of my old useful stuff into the new language to learn how to do things in the new language.

like image 63
James Thompson Avatar answered Sep 28 '22 07:09

James Thompson