Skip to content

Instantly share code, notes, and snippets.

@kwokster10
Last active February 13, 2018 18:55
Show Gist options
  • Save kwokster10/dcae68e8dc865e00a72a7df540cdc11e to your computer and use it in GitHub Desktop.
Save kwokster10/dcae68e8dc865e00a72a7df540cdc11e to your computer and use it in GitHub Desktop.
Helpful CI commands

To delete all merged branches locally other than ones with master and production in name

git branch --merged | egrep -v "(^\*|master|production)" | xargs git branch -D

To remove all docker containers

docker rm $(docker ps -aq)

To remove all docker images

docker rmi $(docker images -q)

To watch an endpoint every second (useful for deploys)

watch -n 1 -d curl -v <endpoint>

To call an endpoint in a cluster that has not been exposed to public yet

curl -LH "Host: <host_of_endpoint>" <cluster_address><path_of_endpoint>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment