Web Form
You can also use this tiny web form to easily upload content.
Link
Recent Items
There is a list showing recent items as well:
Link
CLI Examples:
Click to show CLI operations
To post the output of a given command:
<command> | curl -F "upload=<-" https://blegh.net/post && echo
To post the contents of a file:
curl -F "upload=<filename.ext" https://blegh.net/post && echo
To post the contents of a file and force the syntax to be python:
curl -F "upload=<filename.ext" -F "syntax=python" \\
https://blegh.net/post && echo
To post the contents of a file and password protect it:
curl -F "upload=<filename.ext" -F "password=humptydumpty" \\
https://blegh.net/post && echo
You don't like sending plain-text passwords:
curl -F "upload=<filename.ext" \\
-F "password=$( echo -n 'bootcat' | sha1sum | cut -c 1-40 )" \\
-F "is_encrypted=yes" https://blegh.net/post && echo
To get the raw contents of a paste (i.e. paste #6):
curl https://blegh.net/raw/6
To get the raw contents of a password-protected paste (i.e. paste #7):
curl -d "password=foo" https://blegh.net/raw/7
Again you don't like sending plain-text passwords:
curl -d "is_encrypted=yes" \\
-d "password=$( echo -n 'bootcat' | sha1sum | cut -c 1-40 )" \\
https://blegh.net/raw/7
Helpers
There are a couple of helper functions in the link below for pasting and
getting pastes. Import it from your ~/.bash_profile
and you should be able to use these functions. Creating a
~/.pasttlerc helps you type less too.
Link
An example of a ~/.pasttlerc is here:
#!/bin/bash
checkupdate="no"
apiurl="https://blegh.net"
verbose=yes