Skip to content

Instantly share code, notes, and snippets.

View akiessling's full-sized avatar

Andreas Kießling akiessling

View GitHub Profile
@akiessling
akiessling / docker-local-hosts.sh
Created March 22, 2019 21:11 — forked from djdevin/docker-local-hosts.sh
docker-local-hosts.sh
#!/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
@akiessling
akiessling / 0_reuse_code.js
Created May 4, 2016 10:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@akiessling
akiessling / fl
Last active August 29, 2015 14:17 — forked from McNull/fl
#!/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