Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
#!/usr/bin/env ruby require "#{ENV['TM_SUPPORT_PATH']}/lib/progress" TextMate.call_with_progress({ }) do path = ENV['TM_DROPPED_FILE'] file = File.basename(path) date = Time.now.strftime("%Y-%m-%d") dst = "images/blog/#{date}_#{file}" %x{ scp "#{path}" "mm:mm/#{dst}" } alt = file.split('.').first.gsub(/[_-]/, ' ').gsub(/\w+/) { |m| m.capitalize } print "" end
From the Design Piracy series on my blog: