this post was submitted on 03 Feb 2025
28 points (91.2% liked)

Fediverse

18076 readers
91 users here now

A community dedicated to fediverse news and discussion.

Fediverse is a portmanteau of "federation" and "universe".

Getting started on Fediverse;

founded 5 years ago
MODERATORS
 

Do any fediverse alternative(s) for GitHub Gists exist?

There are lots of platforms connected together through the ActivityPub. Since I discovered the fediverse, I've used Mastodon, Lemmy, Pleroma, Writefreely, Mitra and Friendica, definitely leaving the centralized platforms for good.

However, as a developer, I've still been using centralized services, such as GitHub and, more specifically, GitHub Gists. Recently, I discovered a project called Opengist which allows for a self-hosted "GitHub Gists" alternative. While it allows for some integrations with centralized servers (e.g., integrated login using GitHub, GitLab, Atlassian Bitbucket, among others), it doesn't seem to allow for ActivityPub integrations.

And this leads me to my question: are there any "fediverse GitHub Gists", where developers could publish code snippets (e.g., P5.js snippets, GLSL shaders and fragments, mathematical experimentation, and so on), while allowing for federation? I imagine they'd be pushed to Mastodon and Friendica similarly as how Writefreely pushes posts to the fediverse, as a truncated text followed by a direct link to the Writefreely article.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 6 hours ago

@Daemon Silverstein ActivityPub is mostly about sending posts and articles.

One relatively easy way to integrate ActivityPub might be to have the snippets be stored in some database on your website, and then have the option to create a post or direct message telling someone about the snippet. If the snippet is short, you could include a code block in the post, or you could provide a link back to the snippet on your website.

If you used something like Hubzilla, you could set permissions, controlling who can see the snippet or post. And, although not really designed for code snippets, Hubzilla does have webpages, articles, and wiki page that support code blocks. Although, now that you mention it, we probably could create an addon specifically for storing code snippets.

If you wanted to sync snippets or import between servers or accounts, that would require more advanced techniques, some of which are not really available over ActivityPub.