pk
scripts
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pk
-
A command-line tool to easily kill processes running on a specified port
I'll use a one-liner for that:
https://github.com/helpermethod/pk/blob/main/pk
Also handles port reuse
- GitHub - helpermethod/pk: Killing processes by port number, with style.
scripts
-
A command-line tool to easily kill processes running on a specified port
Funny and weird to see this on HN. I was "working" on this problem a couple of weeks ago, mainly because of orphan node processes caused by closing VSCode for mac before closing long-living processes started by it.
I found that this script
https://github.com/strlns/scripts/blob/main/killbyport.sh
creates less of a delay for me, but I'm not sure if it works for processes started by root etc.
Before, I went with exactly what hayst4ck posted.
For everything serious (not Node on 3000 or 5173 or something like that, where I know the cause and process in advance), I'd still look at lsof manually and feel kind of validated seeing this posted by a sysadmin.
What are some alternatives?
tcpkill - Kill an open TCP connection on your machine
killport - A command-line tool to easily kill processes running on a specified port.
killport - Killport is a for gigs, command-line utility for killing processes listening on specific ports.
port-to-process - port-to-process: Given a port number, look up any associated process and pid