Skip to content

Instantly share code, notes, and snippets.

@kballenegger
Created August 4, 2014 05:59
Show Gist options
  • Save kballenegger/f92ddebcb959c08080f0 to your computer and use it in GitHub Desktop.
Save kballenegger/f92ddebcb959c08080f0 to your computer and use it in GitHub Desktop.
Screenshot uploader script.
require 'cgi'
require 'terminal-notifier'
f = ARGV.first
fn = f.split('/').last
system("scp '#{f}' 'azure:/home/kenneth/www/akhun.com/public/seo/skitch/#{fn.gsub(' ', '\ ')}'")
system("mv '#{f}' '#{File.expand_path('~/.Trash/')}/'")
system("echo 'http://akhun.com/seo/skitch/#{CGI.escape(fn).gsub('+', '%20')}' | pbcopy")
TerminalNotifier.notify("Copied URL for #{fn} to clipboard.", :title => 'Screenshot Uploader')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment