Category Archives: Uncategorized

Link dump

Reading: Felicia Day’s autobiography, You’re Never Weird on the Internet (Almost). In fact, I’m listening to it. First crack at using my library’s audio book reservation. It’s a fantastic book; very relatable and touching. A story of an interaction with a fan may have made my bus ride home uncomfortably dusty.

Listening to: Chipzel radio on Google Play Music. Making my peace with the upcoming death of Songza.

Playing: Toca Builders on iPhone. Yes, it’s for kids. But it’s really great. On my Mac, I’m playing Last Horizon.

An easier way to kill processes

I’ve moved on from ps aux | grep -i processname; kill PID. The Mac (along with many other Unix-likes) has two handy utilities: pgrep and pkill. pgrep does a case-insensitive search for processes matching the expression you provide, and returns all matching PIDs, one per line. pkill does the same search, but just kills the matching processes instead of returning the PIDs.

A common use case for me is middleman hanging when I change the config.rb. I could kill it using the following:

kill `pgrep middleman`

pkill middleman

One of the benefits of using pkill is that you can run the command interactively. Handy if you end up searching on the scripting language running the process, rather than something a bit more unique.