eval `docker-machine env your-vm`docker rmi $(docker images | grep "^<none>" | awk '{print $3}' | tr '\n' ' ')| #!/bin/bash | |
| # Install docker | |
| apt-get update | |
| apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) \ | |
| stable" | |
| apt-get update |
| #!/bin/bash -e | |
| # To unset cluster config in ~/.kube/config | |
| if [ -z "$1" ] | |
| then | |
| echo "Usage: unset-kube-cluster.sh [cluster-name]" | |
| exit | |
| fi | |
| cluster_name=$1 |
| # Put into .bashrc, source .bashrc, (max. 1000 requests per day) | |
| # Example: | |
| # $ ip2geo 8.8.8.8 | |
| # { | |
| # "ip": "8.8.8.8", | |
| # "hostname": "google-public-dns-a.google.com", | |
| # "city": "Mountain View", | |
| # "region": "California", | |
| # "country": "US", | |
| # "loc": "37.3860,-122.0838", |
| # Call virtualenvwrapper's "workon" if .venv exists. This is modified from-- | |
| # http://justinlilly.com/python/virtualenv_wrapper_helper.html | |
| # and https://gist.github.com/cjerdonek/7583644 | |
| has_virtualenv() { | |
| if [ -e .venv ]; then | |
| ENV_NAME=`cat .venv` | |
| workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" | |
| elif [ $CD_VIRTUAL_ENV ]; then | |
| deactivate && unset CD_VIRTUAL_ENV | |
| fi |