fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

When posting code snippets, does anyone use a tool, or is it a manual process with screenshots from a text editor?

I guess the only way is to have the code in an image and the alt text being the code itself?

@gigantos
I haven't tried sharing code on here yet, though my immediate thought process would be to create a pastebin or gist and paste the link here.

My only concern about code in an image is if it would turned out blurry. Maybe SVGs can solve that issue.

@brozek I'm talking about snippets of a few lines, and the resolution should be more than good enough for that.

My concern with images is 1. how to make it and 2. how to allow copy + paste

Brandon Rozek

@gigantos Browsing around I found this cool open source application for creating nice looking code images

Carbon: carbon.now.sh/

This can output both as PNG and SVG, though sadly it doesn't look like Mastodon supports SVGs. As you mentioned before, the best bet is likely to have the code in the alt image.

carbon.now.shCarbonCarbon is the easiest way to create and share beautiful images of your source code.