Skip to content

Instantly share code, notes, and snippets.

Derek dkoloditch

Block or report user

Report or block dkoloditch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View git_setup.sh
#!/bin/sh
name=""
email=""
echo " "
echo "****************************"
echo " "
echo " Git Config "
echo " "
echo "****************************"
echo " "
@dkoloditch
dkoloditch / .docker_prompt_with_git
Last active Jan 16, 2018
Bash prompt for Docker containers that shows current Git branch
View .docker_prompt_with_git
# Based on: https://gist.github.com/scmx/242caa249b0ea343e2588adea14479e6
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='🐳 \[\033[1;36m\]\h \[\033[1;36m\]\W \[\033[1;34m\]$(parse_git_branch) \[\033[1;34m\]\[\033[1;36m\]# \[\033[0m\]'
@dkoloditch
dkoloditch / .docker_prompt
Created Jul 30, 2017
Fancy Docker Prompt
View .docker_prompt
# Per: https://gist.github.com/scmx/242caa249b0ea343e2588adea14479e6
PS1='🐳 \[\033[1;36m\]\h \[\033[1;34m\]\W\[\033[0;35m\] \[\033[1;36m\]# \[\033[0m\]'
@dkoloditch
dkoloditch / vpn_split_tunneling_script.sh
Created Jan 31, 2017
OS X Cisco IPSEC VPN Post-Connection Split-Tunneling Script
View vpn_split_tunneling_script.sh
#! /usr/bin/env bash
# per http://www.shadabahmed.com/blog/2013/08/11/split-tunneling-vpn-routing-table/
if (( EUID != 0 )); then
echo "Please, run this command with sudo" 1>&2
exit 1
fi
WIRELESS_INTERFACE=en0
TUNNEL_INTERFACE=utun0
GATEWAY=$(netstat -nrf inet | grep default | grep $WIRELESS_INTERFACE | awk '{print $2}')
You can’t perform that action at this time.