Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (35 sloc) 1.01 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby
require ENV['TM_BUNDLE_SUPPORT'] + '/gist.rb'
if @continue
response = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'), {
"files[#{@name}]" =&gt; @contents,
"login" =&gt; @login,
"token" =&gt; @token
})
if response.body =~ /&lt;repo&gt;(\w+)&lt;\/repo&gt;/xi
`echo -n "http://gist.github.com/#{$1}" | pbcopy`
puts "Public Gist URL copied to clipboard"
else
puts "Error uploading public gist"
end
end
</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>~@U</string>
<key>name</key>
<string>Create Public Gist</string>
<key>output</key>
<string>showAsTooltip</string>
<key>uuid</key>
<string>2759C467-E0AD-488D-A37C-D8E978DEE9AB</string>
</dict>
</plist>
Something went wrong with that request. Please try again.