Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 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
@hrldcpr
hrldcpr / tree.md
Last active April 15, 2024 15:27
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!

IAB_CATEGORIES = {
"IAB1":"Arts & Entertainment",
"IAB1-1":"Books & Literature",
"IAB1-2":"Celebrity Fan/Gossip",
"IAB1-3":"Fine Art",
"IAB1-4":"Humor",
"IAB1-5":"Movies",
"IAB1-6":"Music",
"IAB1-7":"Television",
"IAB2":"Automotive",
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
@sshadmand
sshadmand / In Terminal
Last active June 30, 2022 11:47
When Public WiFi (like Airport) wont re-prompt for login
//
// Based on answer from Gareth here: https://apple.stackexchange.com/questions/88396/forcing-the-wifi-password-entry-dialogue-to-display
//
#> 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