I like the simplicity of the interface, though it seems to insist that everything I save is Erlang code. I also wish the haste command wasn't a special Ruby client; something POST-driven like http://sprunge.us would be fantastic.
curl -d "$(cat test.rb)" http://hastebin.com/documents
Which returns: {"key":"kixuxorico"}
Meaning you can find it at http://hastebin.com/kixuxoricoIf 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[0] - https://github.com/seejohnrun/haste-client/blob/master/lib/h...