@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.

@theenoro @lucifargundam

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.

@farooqkz @theenoro

>>I think you Lucifer don't know what I mean because you never worked with Github Gist.
<< That's a presumptuous and false statement.

>>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.
<<I've used Gist for code snippits and notes. Another alternative to gist for such purposes I've used is pastebin.com. I'm not constantly logged into GitHub/gitlab/sourcehut/etc and pastebin doesn't require a login in order to save/write content to the server.

>>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.
<<You can already share small pieces of code in toots. Sure, there's character limits - but that varies depending on the server. Again, what features are you looking for? If it's literally just everything you get from mastodon (but for code), then just start your own instance and make adjustments to your preferences. Perhaps you're overthinking things?

>>I believe ActivityPub can be used for such a purpose.
<<Mastodon implemented activitypub a long time ago. You can expand it's capabilities in your own federated server if you're not content with features another federated server provides. Qoto has a high character limit, for example; as well as having incorporated audio, video and matrix services. Though the matrix chat is kinda dead most of the time.
--------------------------
>>Do you any any alternative to Github Gist?
<<So you want to post code and have users/bots be able to like/boost comment on it? You can do so freely here.

@lucifargundam @theenoro

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.

@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;

@lucifargundam @theenoro

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.

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 forg.es

Project was also suggested to @codeberg in codeberg.org/Codeberg/Communit

@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 used. I was hoping it's not in or and luckily I saw it's in

Also 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 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.

Follow

@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 github.com/farooqkz/chooj

But I think it's much better if you let something like nginx handle incoming requests for downloads.

github.com/realaravinth/gitpad

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.

caddyserver.com/

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.