Skip to content
Browse files

A few aliases to manage wayward script/server processes.

  • Loading branch information...
1 parent 12a1b20 commit 6f919d5e17565b67a1c3803d60a7160a66032168 @holman committed Mar 1, 2010
Showing with 11 additions and 0 deletions.
  1. +2 −0 zsh/aliases
  2. +9 −0 zsh/functions/deathss
View
2 zsh/aliases
@@ -39,6 +39,8 @@ alias scaffold='script/generate nifty_scaffold'
alias migrate='rake db:migrate db:test:clone'
alias rst='touch tmp/restart.txt'
alias rcov='rake rcov:all'
+alias s="ps aux | grep \"[r]uby\" | grep script/server || echo \"You're not running any, dawg.\""
+alias deathss='~/.dotfiles/zsh/functions/deathss'
# commands starting with % for pasting from web
alias %=' '
View
9 zsh/functions/deathss
@@ -0,0 +1,9 @@
+#!/usr/bin/env ruby
+#
+# deathss
+# Betrays and murders all running script/servers.
+# Now the Jedi are all but extinct.
+
+`ps aux | grep [r]uby | grep script/server`.split("\n").each do |line|
+ `kill -9 #{line.split(' ')[1]}`
+end

0 comments on commit 6f919d5

Please sign in to comment.
Something went wrong with that request. Please try again.