4 ms·
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 cli
by lubutu 15y ago
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 http://sprunge.us would be fantastic.
- deleted 15y ago[deleted]
- neilparikh 15y agoLooking in the code for the client [0], it turns it already uses a POST to create a paste. [0] - https://github.com/seejohnrun/haste-client/blob/master/lib/haste.rb https://github.com/seejohnrun/haste-client/blob/master/lib/h...
- JakeSc 15y agoI'm curious, do you use a library to generate the pronounceable URLs?
- franciscoapinto 15y agoIf you look at them, they're just consonant-vowel pairs. Did I misunderstand what you were talking about?
- idonthack 15y agohttps://github.com/seejohnrun/haste-server/blob/master/lib/key_generators/phonetic.js https://github.com/seejohnrun/haste-server/blob/master/lib/k...
- neilparikh 15y agoI'm not the one who made this, I just thought it was quite useful and posted this. You could try and create an issue to ask. Sorry!
- corin_ 15y agoAs 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