Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
/ snac_archived Public archive

snac is the snippet manager you, or your small Team, needs.

Notifications You must be signed in to change notification settings

Sett17/snac_archived

Repository files navigation

Project on hold, latest commit is not in working state

commits 3439da0d6eeb6664220c2a56c6ff7cee20a0b5f4 or 6d795972529fc3f7db596ce29ca2cf91ad32ec3b may work

Snac

snac is the snippet manager you, or your small Team, needs. Ever google the same thing multiple times a week, and then see your colleague also searching for the same piece of code? No more!

Now you can easily use snippets in any language (or in no language?!), with a simple table making use of Postgresql features, and a clean looking web frontend inspired by Colors of GitHub Copilot.

This is a rewrite in Go and VanillaJS from the Fullstack Kotlin version before. The Kotlin version is no longer being maintained but is accessible on the kotlin-version branch

contributors last update forks stars open issues


Screenshot

Installation

Download the distribution zip and create a config.yaml from the the config-template.yaml to your liking and start the server.

./snac

The sql code to create the table and the needed function dn trigger in the sql/. The table.sql file should be executed last.

NOTE: The sql files assume a user called snac.

Building

Clone this repo

git clone https://github.com/Sett17/snac.git

and run the go build command to build the binary.

go build .

Config

Currently, all items in the config-template.yaml are needed.

Explanations for each configuration key are given in the config-template.yaml file.

Frontend Usage

Shortcuts

Key Description Context
ctrl+s Saves the current snippet Everywhere
ctrl+enter Re-Highlights the Snippet (is also done automatically after editing) in Editor
tab Inserts 2 spaces in current cursor position in Editor

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT