This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Chris Tomkins-Tinch <[email protected]> | |
if [ "$1" == "-h" ] ; then | |
echo "Purpose: Attaches a bash session to a running docker container" | |
$0 | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker rmi $(sudo docker images | grep "^<none>" | awk "{print $3}" | tr -s ' ' | cut -d ' ' -f 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker rm $(sudo docker ps -a | grep Exit | cut -d " " -f1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker stop $(sudo docker ps -a -q) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker rm $(sudo docker ps -a -q) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker rmi $(sudo docker images -a -q) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls_ext() { | |
if [ $# -eq 0 ]; then # if ls is called without any arguments | |
# make ls print full info, with color | |
ls -laF | |
else | |
ls $@ # otherwise call as intended | |
fi | |
} | |
alias ls="ls_ext" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DAEMON_TIMEOUT=${DAEMON_TIMEOUT:-20} # timeout in seconds | |
DOCKER_UNIX_SOCKET="/var/run/docker.sock" | |
# Start docker here | |
service docker start | |
CHECK_CMD="while ! /bin/echo -e 'GET /v1.3/version HTTP/1.0\n\n' | socat - unix-connect:$DOCKER_UNIX_SOCKET 2>/dev/null | grep -q '200 OK'; do | |
# Wait before checking again to see if Docker is up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctrl-w //allows jumping between the three documents | |
:ls //lists the buffer (each of the 3 way documents) names | |
:diffget [buffer number] //focuses on the window you want to keep | |
:only //closes text areas that aren’t in focus | |
:wq //write this text to file and quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
mkdir ~/Library/KeyBindings | |
touch ~/Library/KeyBindings/DefaultKeyBinding.dict | |
via: | |
https://ss64.com/osx/syntax-keybindings.html | |
https://ss64.com/osx/syntax-keyboard.html | |
Key Modifiers | |
^ : Ctrl |
OlderNewer