Skip to content

Instantly share code, notes, and snippets.

@clayton
Created July 2, 2010 05:38
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 clayton/460977 to your computer and use it in GitHub Desktop.
Save clayton/460977 to your computer and use it in GitHub Desktop.
desc "Show ps"
task :ps do
run 'ps ax' do | channel, stream, data |
puts data if stream == :out
if stream == :err
puts "[err: #{channel[:host]}] #{data}"
break
end
end
end
desc "Stream log from rails"
task :log, :roles => :app do
stream "tail -f #{current_path}/log/#{rails_env}.log"
end
desc "Get uptime from server"
task :uptime, :roles => :app do
run 'uptime'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment