Skip to content

Instantly share code, notes, and snippets.

@jonemo
Created September 13, 2017 03:34
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 jonemo/c5c09e13f094d8339b226e4e6443f26c to your computer and use it in GitHub Desktop.
Save jonemo/c5c09e13f094d8339b226e4e6443f26c to your computer and use it in GitHub Desktop.
bits of dotfiles
# kill program hogging given port number
function killport {
lsof -ti :$1 | xargs kill
}
# clean up docker volumes and images
# https://stackoverflow.com/questions/31909979/
function dclean {
docker volume rm $(docker volume ls -qf dangling=true)
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
}
# make virtualenv-wrapper use python3 as default when making new
# virtualenvs
export VIRTUALENV_PYTHON=`which python3`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment