Hello all. Do you any any #federated alternative to Github Gist?
#fediverse #snippet_sharing #snippet #code_sharing #code #snippet #programming #development #github #gitlab #gist
@farooqkz just make another repo? Or use pastebin? Not sure exactly what you mean.
@lucifargundam @farooqkz for me it sounds like selfhosted services. Cause there are many ways to selfhost gitea/gitlab/hastebin and so.
This is what I think fits. ¯\_(ツ)_/¯
But same as Lucifar I'm also not exactly sure.
I think you Lucifer don't know what I mean because you never worked with Github Gist.
Gist can be seen as some sort of special repo(actually it's a git repo) but optimized for sharing small pieces of code(usually a single file). A real repository would be an overkill for such a purpose and also it doesn't support comments the same way Gist does.
Think it of something like Mastodon but optimized for sharing small pieces of code in a single file or at most only a handful. People could comment, fav, boost, etc.
I believe ActivityPub can be used for such a purpose.
Hmm just checked pastebin.com it doesn't seem to be part of fediverse.
Yes perhaps I am overthinking it perhaps not. Mastodon definitely is the closest thing which exist but not perfect for code sharing.
Yeah I can write a clone of pastebin which is federated. But before I even think about starting such a project, I wanted to check with community if such a thing already exists :)
@farooqkz @lucifargundam @theenoro
Though it isn't federated @realaravinth started a project to create a good alternative for #Github Gists called #GitPad.
https://github.com/realaravinth/gitpad
I certainly see merit to have federation support, maybe in the context of #ForgeFederation and automating more parts of the Free Software Development Lifecycle (#FSDL)
This project may then be part of The Forgers Guild, see https://forg.es
Project was also suggested to @codeberg in https://codeberg.org/Codeberg/Community/issues/382#issuecomment-378018
@humanetech @lucifargundam @theenoro @realaravinth @codeberg@mastodon.technology
The project Gitpad definitely looks promising and I hope success for it. The first thing which I checked in it's repo is the #programming #language used. I was hoping it's not in #Python or #Javascript and luckily I saw it's in #Rust
Also #ActivityPub support is in their TODO list. The least I can do now is staring their repo. Maybe in near future I could create a small CLI to post a #gitpad without leaving terminal.
And finally, a community maintained list of current active instances which registration is public in them would be nice as well. Let me know if such a thing already exists. Otherwise I will create if myself.
@farooqkz @humanetech @lucifargundam @theenoro @codeberg
> I can do now is staring their repo. Maybe in near future I could create a small CLI to post a #gitpad without leaving terminal.
I'd love to help with that. The #GitPad REST API provides similar functionality as the web UI, so writing programs to interact with it is possible :)
That said, all #GitPad gists are Git repositories. I have to figure out how to cleanly implement Git functionality like push and pull.
@realaravinth @humanetech @lucifargundam @theenoro @codeberg@mastodon.technology
Oh you are the developer! I am honored :D
I have forked your repo to add automatic build for each push. Do you have anywhere to host the build artifacts?
@farooqkz @humanetech @lucifargundam @theenoro @codeberg
Nice to meet you too :D
> Do you have anywhere to host the build artifacts?
I'm not sure I understand what you mean by "build artifacts".
I publish docker image from each push to the master branch and have plans to upload GNU/Linux binaries at dl.gitpad.org.
Do you have something else in mind?
@realaravinth @humanetech @lucifargundam @theenoro @codeberg@mastodon.technology
Yeah I meant the latter. But maybe not only for Linux. You could have the build binaries for the latest commit in dl.gitpad.org or anywhere else you prefer.
@farooqkz @humanetech @lucifargundam @theenoro @codeberg
dl.gitpad.org should work for now, I think. It's running [dumbserve](github.com/realaravinth/dumbserve), which was purpose-built for uploading bins. Or do you have other ideas?
I don't want to rely on more GitHub stuff, as I'm slowly migrating to a self-hosted Gitea instance.
@realaravinth @humanetech @lucifargundam @theenoro @codeberg@mastodon.technology
Hmm dumbserve looks nice and similar to what I've done for https://github.com/farooqkz/chooj
But I think it's much better if you let something like nginx handle incoming requests for downloads.
https://github.com/realaravinth/gitpad/blob/master/.github/workflows/linux.yml#L62
Here, you just need to add additional stuff for other platforms. For now I think you'd better support as many as possible but only those which work out of the box.
@farooqkz @humanetech @lucifargundam @theenoro @codeberg
> Hmm dumbserve looks nice and similar to what I've done for
Nice!
> But I think it's much better if you let something like nginx handle incoming requests for downloads.
I couldn't come up with a straghit forward way to do authenticated uploads with nginx. If you are worried about performance, dumbserve is powered by Actix Web[0], which is quite fast.
> Here, you just need to add additional stuff for other platforms.
Cross-compiling is a little tricky with some of the libs that #GitPad is using. Or maybe I just don't know how to do it porperly. I used rust-cross[1], btw.
If you are interested, feel free to send a PR :D
[0]: actix.rs
[1]: github.com/japaric/rust-cross
@realaravinth @farooqkz @lucifargundam @theenoro @codeberg
Not that I know if things are easier than with #nginx but you might also have a look at #Caddy. It is a popular, easier alternative to Nginx.
@farooqkz @theenoro
No, pastebin isn't federated- but it does have an API. If you're knowledgeable enough to run your own instance, you can likely run pastebin into it. Otherwise, you can write up a personal clone. This is all assuming you wanted pastebin.
Did you just want to see code and like it?
#!/bin/sh
echo "blah";
which sl;