Skip to content

Instantly share code, notes, and snippets.

@avescodes
Created June 12, 2009 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avescodes/128683 to your computer and use it in GitHub Desktop.
Save avescodes/128683 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'fileutils'
dest_filename = 'screenshot.png'
domain = 'hammerofcode.com'
remote_user = 'ryan'
local_file = Dir["#{ENV['HOME']}/Desktop/Screenshot*"].last
puts "Pushing \"#{local_file}\" to server..."
puts `scp "#{local_file}" og:/srv/http/#{remote_user}/#{domain}/htdocs/#{dest_filename}`
`echo 'http://#{domain}/#{dest_filename}' | pbcopy`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment