Add the attached bash function to your .bashrc (or bash_profile), then source .bashrc (or bash_profile) and use it like this:
$ killport 8000
killport will tell you the name of the killed process, or it will let you know if it couldn't find any process with that port open.
this is great - thanks!