Skip to content

Instantly share code, notes, and snippets.

@arahayrabedian
Created May 8, 2015 12:01
Show Gist options
  • Save arahayrabedian/e487a8d9325a7f9320cc to your computer and use it in GitHub Desktop.
Save arahayrabedian/e487a8d9325a7f9320cc to your computer and use it in GitHub Desktop.
useful aliases
alias gs="git status"
alias dc="docker-compose"
alias clearpyc="find . -name \"*.pyc\" -exec rm -rf {} \;"
alias cleandockerimages='docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")'
alias flushdns="sudo kill -HUP $(pgrep dnsmasq)"
# not sure if the latter works - see jpetazzo/squid-in-a-can for details
alias squidinacan="docker run -v ~/.squidinacan/:/var/squid3/cache -d --net host jpetazzo/squid-in-a-can && sudo iptables -t nat -A PREROUTING -p tcp --dpo$
alias killsquidinacan="sudo iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to 3129 -w"
# wrapper for docker exec -it <container_id> bash --> dbash <container_id>
function dbash(){
docker exec -it $1 bash
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment