Best Alternatives for Sharing Code Snippets

It is even possible to generate your code wallpaper with: blur, rotate and colorschemes!

10 Best Alternatives for Sharing Code Snippets

A simple utility, but it helps a lot for those who need to constantly make code snippets available, me for example! 😀️. I separated some for you, let’s go to the list!

For some of our usage examples we will use the following file:


#!/usr/bin/env bash
# Code example to shared snippets
# Author: Marcos <>
    tput cnorm
    echo -e "\n\e[31;1mBye!\e[m"
    exit 127
trap send_msg SIGINT
tput civis
while true;
    echo -en "\r\e[33;1mThis is \e[36mMy Code\e[34m at \e[37m$(date +%d/%m/%Y-%H:%M:%S)\e[m"


Your code is shared via the command line, for example:

# Sharing a file and getting the link
cat | curl -F 'f:1=<-'

The output will inform you of the link you can use to share. If you want more ease, create a Shell function for this or use their client available on the same page, in addition to other options, such as saving codes and links when running the command.

Generated code link:


In the same way as the previous one, but even simpler, example of use:

cat | curl -F 'sprunge=<-'

Generated code link:

03. Hastebin

Hastebin It works online, you need to enter (type/paste) your code and click Save 💾 Ctrl + s. If you want to share your code, just click Just Text 📋️ or hit Ctrl + shift + r.

You can still use their client via the command line, installing it via gem:

gem install haste

And using as follows:

cat | haste

Generated code link:

There is the possibility for you to use your own server, see more details here.

04. Gist GitHub

This is the option and one of the best known, as it has the GitHub brand/advertising . You can share anonymously too or if you are logged in, it is recorded for your user.

There are even customers for him: Lepton and also: Gisto. Another unrelated service is a url shortener:, it only shortens website URLs/addresses related to GitHub, but it works if you want to shorten your snippets and even same long GitHub URL.

You can shorten it via the command line in a personalized way, example:

Edit YOUR_LONG_URL and LETTERS_CUSTOMIZED for specific names if you want.

# curl -i -F "url=" -F ""

Generated code link:


05. GitLab Snippets

GitLab Snippets Similar to Gist, however, there is no possibility to create anonymous snippets, you must be logged into your GitLab account. A very beautiful interface!

The codes that the programmers made available to the public can be consulted here.

To create you need to be logged in and go to the + button or the New Snippet button. New Snippet GitLab


It also works online and it encrypts your URL, just access the address and type/paste your code and it automatically saves and makes raw available in the bottom right corner of the screen:

07. Termbin

This is a show of the ball, it runs via the command nc (needs to have netcat installed) and the insertion is very simple, example:

cat | nc 9999

08. InstaCode

This is loko, sharing is via image and you can create Wallpaper and edit your image: rotate, blur, colorschemes and among other options! Worth the click. InstaCode

Generated code link:

09. Ubuntu PasteBin

It goes without saying that it is from distribution Linux Ubuntu with a clean and professional interface: Ubuntu PasteBin paste Ubuntu PasteBin code

Generated code link:

10. This is complete, it is not just a code snippet, but a file sharing, url and everything you want within the limit of 512MB.

It is an alternative to Example of use:

curl -F' '

Bonus - Carbon


And as a bonus tip, perhaps the most dearest alternative for the guys is Carbon. You can choose color scheme, background color and even save generated image in 3 different resolutions including 4k.

There is no shortage of options, feel free to choose in this alternative world! 😀️ One that I would definitely not recommend would be, this one generates ‘bad interpreter’ in your code, if you download and use it on Linux.

Thanks for reading!

development programming tips