Last active
August 29, 2018 17:31
-
-
Save Brantron/494a28d17b7d4b4e9f1ac8f3b400d34c to your computer and use it in GitHub Desktop.
Revisions
-
Brantron revised this gist
Aug 29, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ Put this functionin your ~/.bash_profile function krails() { lsof -i tcp:3000 | awk -v N=2 '{print $N}' | tail -n -2 | xargs -L1 kill -9 } then from the terminal reload with `source ~/.bash_profile` and you can run `krails` anytime in the terminal to kill all rails processes -
Brantron created this gist
Aug 29, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ function krails() { lsof -i tcp:3000 | awk -v N=2 '{print $N}' | tail -n -2 | xargs -L1 kill -9 }