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.
@Daemon Silverstein What features are you looking for in particular? An interface that stores code snippets and organizes them would not be too hard to build.
The question is, what federated features would you like to have?
@scott I'm looking for something alternative to Github Gists, so I could quit it and go to a decentralized platform. Not the GitHub itself, but Github Gists, which is more like a multi-file "pastebin".
Something decentralized, federated, something akin to Writefreely where posts outside Writefreely (e.g., when seen from Mastodon) shows up as a shortened/summarized version, but tailored for code sharing, allowing for syntax highlighting, proper Markdown rendering and allowing for multiple text files within the same publication ("parts" within the "whole", each one having their own filename; by "files", I mean text files and source code such as .mjs, .js, .rb, .md, .txt, .csv, etc... not binary files such as images or movie-clips or audio or executables or zip/tarball/rar archives). Something that I could choose between hosting it myself (i.e., having my own instance) or using an existent instance, with the possibility of migration between instances (similar to Mastodon's Export feature, but also allowing for importing exported publications).
The closest thing would be @Daeraxa suggestion, Distbin (sorry Daeraxa for not getting to reply your comment yet, Friendica didn't deliver it to me yet, but I saw your comment through Lemmy and I tested Distbin here). Sadly, as Daeraxa mentioned, that project is abandoned, with the last commit dating back from 6 years ago. Also, there are several issues (publications are anonymous because there's no account system, publications can't deal with multiple "files", no deletion mechanism, etc). It's the closest thing, but not the thing.
Software forges (such as Vervis, Gitea and Forgejo) are really good for full projects. However, while I sometimes create full projects (where software forges, branches and forks, pull requests, CI/CD pipelines and source versioning would apply), the majority of my dev portfolio is composed of small-to-medium-sized code snippets experimenting with Node.js/Javascript, Python, Ruby and Shellscript, sometimes one-liner code snippets, and wrapping them up within full repos is overkill.
Maybe I'm going to do a solution myself in the future, I'm not sure, it's not exactly a plan or a promise. The core functionality seems simple to develop (looking at the Distbin's source, it seems really simple) but integrating with ActivityPub and relaying info about multiple files within a publication in a format that's compatible with other fediverse platforms (Mastodon, Friendica, etc) is a whole other story, in parts because I'm yet to learn about the technicalities of ActivityPub (i.e. how it really works behind the scenes beyond the
/api/v1
calls).@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.