Creating a new Pastie is as simple as sending a HTTP POST request to this URL:
http://pastebit.com/send
And the following
POST parameters (and values):
pastebin_doctypes_id="-1"
pastie_content="hello, world"
just_url="1"
If you want to submit your text as file, just set:
pastebin_doctypes_id="-2"
If you want to change the default (30, max is: 365) expiration days, say, to
60, just set:
expiration_days="60"
On success, a valid http:// URL is returned. JSON output will be available in
future releases.
If you are running
Sabayon Linux, this is really easy, just install
pastebunz, this way:
# equo install app-text/pastebunz
If you are running another distribution, you can however use pastebunz, by just
downloading the Sabayon package and unpacking its content. In the end, it's just a very simple python script.
At this point, just send the output of your app (in this case, of
cat) to pastebunz, this way:
cat /etc/resolv.conf | pastebunz
To paste and send the data to a file instead, just use:
cat /etc/resolv.conf | pastebunz -f
Done!