Skip to content

Instantly share code, notes, and snippets.

sshadmand / In Terminal
Last active Mar 11, 2022
When Public WiFi (like Airport) wont re-prompt for login
View In Terminal
// Based on answer from Gareth here:
#> ifconfig
// this will give you a list of MAC addresses
// or
#> sudo ifconfig en0
// will give you a specific MAC address (you will be prompted for your system's admin password
View Prune all local branches without remote a branch
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
View gist:5600446
"IAB1":"Arts & Entertainment",
"IAB1-1":"Books & Literature",
"IAB1-2":"Celebrity Fan/Gossip",
"IAB1-3":"Fine Art",
hrldcpr /
Last active Feb 25, 2022
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

spicycode / tmux.conf
Created Sep 20, 2011
The best and greatest tmux.conf ever
View tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000