Support me


If you enjoyed this program and would like to support my future work, you can do so here:
Patreon

Description


Have you ever faced a situation during a large project where you needed to solve a problem you had already tackled before? In such cases, you usually end up searching through thousands of lines of code, trying to locate the relevant snippet. This app aims to provide a solution to that issue. With its help, you can save your code snippets to a local MongoDB database and perform quick searches to find them when needed. If you're learning to program, it's also useful for making notes.

News in this version


Preparations Before Installation


To use the app you need to have a MongoDb server installed. Before you run the app make sure that MongoDb is installed, and running on your system, otherwise the app will not work.
You can download the installer and find installation instructions here:
MongoDb Community Server Download

Installation


You can install the app either via the installer or by compiling the code yourself after downloading it. In both cases, you'll need .NET to run the application, which can be downloaded from Microsoft's website:
.NET Download
Once installed, you can launch the program using the desktop shortcut. The installer is available for download here:
Snippet Store Setup Download
Before you unpack the installer, check one of the checksums below.

License


The program is free to use.

Checksum (setup.zip)


Algorithm : SHA256
Hash : 45CE692D7831FE1D6C6565ECC89753EA69BEAAC0E8A5061DE4067B6DA725C732

Algorithm : SHA1
Hash : 5BA6DAD61E5524068BE3AE7745387D3D787D7882

Algorithm : SHA512
Hash : 87D93163D528B1BA4F1F402AAF8A057522E9BE2C69341CA7F752E30F5F46B5C82B2E00F1109F6B7AA9E94F4A0ADAAF6EE63CAE87675AFFF6D57EE47043A617C6

Algorithm : MD5
Hash : 3E1EB958FAE0AE0328A70AA427E42ADC

Main interface



The toolbar buttons provide the following functionalities: On the left, snippets in the database are grouped by language. In the top-right section, you'll find the snippet viewer.

Settings


Before you start using the app, it is a good idea to make the necessary settings. The programming languages you want to use should be entered in the database. This can be done in the left side of the settings. Type in the language name and click on the + button to add it. If you want to delete a language, select it from the list and click on the - button.

Backup location
Specify a directory where the backup will be made by the app.

Connection Setup
If you want to change the database connection you can enter the new connection string in the connection section. The connection must be tested before it is saved, this can be saved by clicking on the Test connection button (next to the floppy). The save button will only be active after a successful test.

You can also set the default font for the editor and code box and the background colour of the code box.

Adding Snippets


  1. Select a programming language from the list (these are the languages you added in the settings).
  2. Give the snippet a name.
  3. Add keywords using the + button, to remove use - button.
  4. Paste your code, format the text and click "Add snippet to Database" to save.
Duplicate snippet names are not allowed. If a duplicate name exists, it will be highlighted with a red background. Note that image insertion is not supported in this version.

Formatting text


Change font type

Use the tools above to change the font and size of the selected text.

Alignment

You can use the above tools to change the alignment of the selected text.

Font style

You can use the above tools to change the font stye (bold, italic or normal) of the selected text.

Create a list

To create a list, select the text you want to convert into a list...
...then click on the create list button

Create a codebox

To create a codebox, select the text you want to convert into a codebox...
...then click on the create codebox button

Create a link

To create a link, select the text you want to convert into a link...
...then click on the create link button

Change font color

To change color of text, select the text you want to change color...
...then select an other color

Insert picture
If you want to paste an image from the clipboard, you can paste it with CTRL-V. When pasting images, make sure that there is a blank line after the images if you want to edit them after pasting.
Inserting images significantly increases the size of the document. To save space, the document is saved compressed in the database, but MongoDb has a special feature that only 16MB can be saved in a document, so an indicator shows how much space is available in the document.

Search


Enter the search term in the text box above the tree view. Note that searches are case-insensitive. If you want to see again each snippets clear the search text field.

Document reader


When you select a snippet in the tree view, the program places the document in the reader on the right side of the screen. You can use the functions at the bottom of the reader to do test editing or search the saved document.

Edit selected snippet


You can edit the selected document by pressing the button above. Editing is done in the same window as creating a new document.

Delete snippet


Click the button above to delete the selected document.

Backup


Click the button above to create a backup. This will make a copy of the database to the folder specified in the settings. Two files are created, one starting with "languages" and one starting with "snippets". The file names will contain the date and time of the backup. The file is saved in BSON format. If a path for the backup is not set in the configuration, this operation cannot be performed.

Restore


To restore a backup, click the button above and select the backup you want to restore. Only 1 database can be restored at a time.

Browse


You can use the button above to browse through the documents, and on this page you can see some statistics about the database. You can open the documents listed in the list by clicking on the button in the last column.

Support me


If you enjoyed this program and would like to support my future work, you can do so here:
Patreon