Skip to content

Instantly share code, notes, and snippets.

# generic aliases for Vagrant
alias allclear='echo -e "\033c\e[3J"'
alias stop='pkill -f "ruby"; pkill -f "node"; echo "node and ruby processes killed."'
alias dev='cd /vagrant; nvm use'
// Place your key bindings in this file to override the defaults
// atom-like additions for VSCode
[
// for quick console.log entries without a newline added
{
"key": "shift+cmd+l",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
@dkoloditch
dkoloditch / git_setup.sh
Created April 15, 2018 18:28
Git Setup Script
#!/bin/sh
name=""
email=""
echo " "
echo "****************************"
echo " "
echo " Git Config "
echo " "
echo "****************************"
echo " "
@dkoloditch
dkoloditch / .docker_prompt_with_git
Last active January 16, 2018 17:11
Bash prompt for Docker containers that shows current Git branch
# 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 July 30, 2017 21:34
Fancy 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 January 31, 2017 19:27
OS X Cisco IPSEC VPN Post-Connection Split-Tunneling Script
#! /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}')