brew install git-flow
sudo apt-get install git-flow
#!/bin/bash | |
user=$1 | |
regions="us sa" | |
sshOptions="-o BatchMode=yes -o ConnectTimeout=1 -o ConnectionAttempts=1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet" | |
ips="" | |
for region in $regions; do | |
ips="$ips $(tws instance list --region ${region}-east-1 | grep running | egrep -o '10\.[0-9]\.[0-9]{1,3}\.[0-9]{1,3}')" |
Delete all containers | |
docker rm $(docker ps -a -q) | |
Delete all images | |
docker rmi $(docker images -q) | |
Removes all containers running under Docker, so use with caution. | |
docker ps -a | awk '{print $1}' | xargs docker kill | |
Removing all Containers that are not running: |
# VIM COMMANDS | |
## SUBSTITUTIONS | |
### Substitute [:<WORD>] by ['<WORD>'] on chef recipes | |
:1,$ s/[[]:\([^]]\+\)[]]/['\1']/gc | |
### Substitute pattern in mutiple lines to another thing | |
:1,$ s/local_action:\n module: \([^\n]\+\)/\1:/gc | |
### Substitute WORD => , to :WORD => node[\'fm_redis\'][\'confs\'][\'general\'][\'WORD\'], on lines 18 to 42 |