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 | |
# Open current directory in forklift | |
# Adapted from https://gist.github.com/elentok/6218781 | |
# Adapted from comment https://gist.github.com/elentok/6218781#comment-891115 | |
# Added optional path argument and removed using the clipboard buffer. | |
set -e | |
if [ -z "$@" ]; then |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 -e | |
# Usage: ./docker-local-hosts.sh containername mylocalname | |
# Get IP of container and strip newlines. | |
INSPECT=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $1) | |
IP=${INSPECT//[$'\t\r\n']} | |
if test -z "$IP"; then | |
echo "Container IP for $1 not found." | |
exit |