
Show HN: MassCode – a code snippets manager for developers - antonreshetov
https://github.com/antonreshetov/massCode
======
proc0
Not to diminish the effort, but the use case for this can only be a role that
requires a ton of snippet handling, which inherently means you are doing
something wrong as a programmer (imho). Once you get to a point where you are
regularly using snippets a lot, writing some automated script is the next
step, not a tool that makes it easier to copy/paste.

~~~
penagwin
Snippets for me are things I find that I google and copy+paste from
stackoverflow semi-frequently. See the example here, it prints the currently
loaded settings in Django. I don't use it super frequently (say a few times a
month, depending on what I'm doing), but it's faster for me to find with a
snippet manager then copying from the same stack overflow answer.

> python manage.py diffsettings --all

~~~
tiredyam
just make an alias :o

~~~
penagwin
I frequently have to run this command inside a VM or a docker container, so I
can't really use an alias for it.

------
JimmyRuska
If you don't need the syntax highlighting, keepassXC does a good job of this.
It's a free password manager. You can create a new folder called code-snippets
and make the URL portion of each entry the code one-liner. You can copy url to
clipboard from app with CTRL+U. This also has the nice property that you can
password protect your snippets. You can also store them in notes or with
attributes.

Cherry Tree, Joplin, Zim, Trilium Notes; all have the ability to create a
tree-like folder structure.

------
jcolella
Just want to say this is great. Poor execution on the demo. README is
incomplete. A basic getting started would have sufficed in this case.

------
arsalanb
Awesome! I've been looking into a way to manage my own code snippets. I'm a
huge fan of ThisCodeWorks
([https://www.thiscodeworks.com/](https://www.thiscodeworks.com/)), which has
gamified snippet storage to an extent. Also great for sharing snippets around.
It's still in beta, but looks good so far!

------
xaduha
I was recently looking for one and I will check it out, but I think I'll
probably just use some git folder with snippets and a ripgrep alias for
searching, I don't need much.

------
thrownaway954
Your demo gif doesn't convey your idea __at all__. What is going on in it? To
me it just looks like you are typing in a hello world function in
jaavascript... where does the snippet portion come in? After I create a
snippet, how do I use them in my current project and current editor? I really
think you need to create demos showcasing these use cases cause as of right
now i'm confused as to why this project even exists.

~~~
cddotdotslash
Here, I rewrote your comment to say the same things in a friendlier way. There
are nicer ways to provide feedback.

> I would recommend updating your demo GIF to more accurately portray the
> idea. Perhaps instead of just typing the function into the text editor, it
> should also convey how snippets can be saved and reused at a later point.
> This would give me a better idea of how to utilize the project.

~~~
derp_dee_derp
There was nothing unfriendly about the original phrasing.

~~~
OGWhales
Can anyone tell me why some comments, like this one, are darker than others?
It would appear lighter with the default scheme.

Image showing what I mean:
[https://i.imgur.com/Beo2qve.png](https://i.imgur.com/Beo2qve.png)

~~~
mttjj
Those are comments that have been predominately downvoted.

From the FAQ:
[https://news.ycombinator.com/newsfaq.html](https://news.ycombinator.com/newsfaq.html)

> Why don't I see down arrows?

> There are no down arrows on stories. They appear on comments after users
> reach a certain karma threshold, but never on direct replies.

~~~
OGWhales
Thank you! I wasn't aware there were even downvotes, so I didn't think of that
as a possibility.

------
jjeaff
Nice. Does it store the snippets in a got repo? Or can it use gitlab or GitHub
snippets as storage, if not, that would be handy.

~~~
lostintangent
If you’re using VS Code, you can checkout GistPad, which allows managing code
snippets, mini-docs, and interactive/CodePen-like playgrounds, all backed by
GitHub Gists: [https://aka.ms/GistPad](https://aka.ms/GistPad).

Disclaimer: I built GistPad, and am just mentioning it since you mentioned
GitHub-based snippets.

------
Throwaway656543
I use Sublime as my code editor. Anything that I need to save as a code
snippet goes into its own Snippets project. That way, I can organize it easily
and open up the project whenever I need it. No separate application necessary
since Sublime is already editing my code anyways.

------
breytex
Very cool project. I like that you have matched the mac os design. Working on
a note app and aiming for a similar UX.

Anyone having an idea how to come close to MassCode's UI with a React.js UI
library? Is there anything out there, which is similar?

------
ArtDev
Tried running locally on Linux but ran into issues and gave up. It seems
useful and I like how it looks.

"npm build" SHOULD get it running locally but it didn't for me. Did anyone
else get it working?

------
elchin
Is there an integration with VS Code or Atom?

~~~
lostintangent
If you’re interested, I built a snippet manager for VS Code that uses GitHub
Gists for persistence. That way, you get a productive, in-editor experience,
while still being able to keep your own data/code, and can benefit from the
existing ecosystem and primitives that have been built around gists (e.g.
embedding gists into Dev.to/Medium blog posts, opening a Gist-based Jupyter
notebook in NbViewer).

It’s called GistPad, and in addition to allowing you to create/manage code
snippets, it supports easily moving files between your local machine and
gists, pasting images, starring/forking gists, viewing and replying to comment
threads, and creating “playgrounds” that are CodePen-like runnable samples:
[https://aka.ms/gistpad](https://aka.ms/gistpad).

Additionally, since it’s a VS Code extension, you can easily edit/manage your
snippets, while taking advantage of your existing editor setup/language
support, using your favorite extensions, arranging files into arbitrary grid
configurations, etc.

~~~
moralsupply
Thanks for the work on that extension, it's very useful.

Can it support private gists? I couldn't find a way to enable that.

~~~
lostintangent
Yep! You can run the “GistPad: New Secret Gist” command, or right-click the
“Your Gists” node in the Gists Explorer and select “New Secret Gist”. Let me
know how that works for you!

“Secret” is the term that GitHub uses (as compared to a private repo), which
is why I call them that.

------
kndjckt
How does this compare to SnippetsLab? I see it’s inspired by SnippetsLab

------
cheez
I use the MoinMoin wiki for this.

