Skip to content

Instantly share code, notes, and snippets.

@Jackleberry
Jackleberry / gist:824d7c3c0f3427e41d85
Last active September 12, 2015 11:42 — forked from ryannealmes/gist:353dcc7f185729c2958d
How to kill all processes with a given name
kill $(ps aux | grep '[d]elayed_job' | awk '{print $2}')
sudo kill -HUP $(ps -ef | grep '[w]ms.server' | grep -v 1084 | awk '{print $2}')
Credit:
http://stackoverflow.com/questions/3510673/find-and-kill-a-process-in-one-line-using-bash-and-regex
@Jackleberry
Jackleberry / gist:b780837a8f5f20a2b1f9
Last active August 29, 2015 14:26 — forked from ryannealmes/gist:d112483d59563bc11499
mysql database dumps + restores
Dump:
mysqldump -u USERNAME -p PASSWORD DBTODUMP > /path/to/DUMPFILE.sql
Import:
mysql -u USERNAME -p PASSWORD DBTOIMPORTTO < /path/to/DUMPFILE.sql/