Skip to content

Instantly share code, notes, and snippets.

@wearhere
Last active February 10, 2017 01:20
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 wearhere/8d385b2c8bb3353cbea5be86e422b67c to your computer and use it in GitHub Desktop.
Save wearhere/8d385b2c8bb3353cbea5be86e422b67c to your computer and use it in GitHub Desktop.
Shell functions for killing rogue servers. Assumes that touching `src/server/router.js` will restart the server.
# Put this in ~/.config/fish/functions/.
function unstick
kill -9 (lsof -ti :$argv[1]); and touch src/server/router.js
end
# Put this in ~/.bashrc.
unstick() {
kill -9 $(lsof -ti :$@) && touch src/server/router.js
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment