2 ms·
As neilparikh already commented it does take POSTed data, you can use it as such: curl -d "$(cat test.rb)" http://hastebin.com/documents Which returns: {
by corin_ 15y ago
As neilparikh already commented it does take POSTed data, you can use it as such:
curl -d "$(cat test.rb)" http://hastebin.com/documents
Which returns:
{"key":"kixuxorico"}
Meaning you can find it at http://hastebin.com/kixuxorico http://hastebin.com/kixuxorico
If you wanted to be slightly more complex, you could define a quick bash function such as:
haste() {
curl -sd "$(cat $1)" http://hastebin.com/documents |
sed -e 's/{"key":"/http:\/\/hastebin.com\//' -e "s/\"}/\.$(echo $1 |
sed -e 's/.*\.//')\n/";
}
or in a single line:
haste() { curl -sd "$(cat $1)" http://hastebin.com/documents | sed -e 's/{"key":"/http:\/\/hastebin.com\//' -e "s/\"}/\.$(echo $1 | sed -e 's/.*\.//')\n/"; }
Then use it as:
haste test.rb
Which returns:
http://hastebin.com/momawevota.rb