Sha256: 526c672988fb55a0f9d4f82bef009dc44de90a1894565a610f127533186558e3
Contents?: true
Size: 572 Bytes
Versions: 1
Compression:
Stored size: 572 Bytes
Contents
# automate creating pasties class Object if :macosx == Platform::IMPL def pastie url = pastie_url = Net::HTTP.post_form(URI.parse("http://pastie.caboo.se/pastes/create"), {"paste_parser" => "ruby", "paste[authorization]" => "burger", "paste[body]" => MacClipboard.read}).body.match(/href="([^\"]+)"/)[1] MacClipboard.write(pastie_url) system("open #{pastie_url}") pastie_url end alias :pst :pastie end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
utility_belt-1.0.0 | lib/pastie.rb |