Show HN: I'm working on an open-source self-hostable GitHub Gist
drift.maxleiter.com
drift.maxleiter.com
Hi HN, I built this over the weekend and last few days and am happy with how its turning out so thought I’d share. The source is available at https://github.com/MaxLeiter/drift
Fyi, Gitlab CE/EE have "Snippets" alias gists with access control. They are quite handy and can be bound to project/ group and individual level as well as only being shared with specific users.
Would love to able to add other code files types like github. ``` in md isn't the solution
But awesome work :)
I added syntax highlighting for files, it’s based on the file extension. I haven’t gotten around to serving the raw file yet though, but the appropriate content type will be set
Thanks for the kind words
The first extension I tried was .py and there was no highlighting for that, which I found a bit odd considering how common it is. I then tried .java and that worked nicely.
It seems that you allow creating files with empty filenames, is that intended?
The demo server returns a 500 when trying to create an item with an empty title.
You might also want to consider allowing the user to specify the highlighting themselves. For example, I might want to specify .bash highlighting for a file with the filename `.bashrc`.
Supporting empty file names is intended, mostly for the use-case of single file pastes, as I do require a post title.
I've completely revamped the code rendering to be server-side the past few days, so I think your problem is fixed. I put an example py here: https://paste.maxleiter.com/post/3da13a78-d9d0-47cb-a657-338...
Specifying filenames is something I've thought of, but I think I'd rather keep the UI free of more buttons and just hardcode .bash{rc} => bash on the server.