Skip to content

Instantly share code, notes, and snippets.

View jwthomp's full-sized avatar

Jeff Thompson jwthomp

View GitHub Profile
@jwthomp
jwthomp / ViewMemory.sh
Created December 7, 2016 18:02
View memory on OS X from cli
Place in .profile
ViewMemory() {
vm_stat | perl -ne '/page size of (\d+)/ and $size=$1; /Pages\s+([^:]+)[^\d]+(\d+)/ and printf("%-16s % 16.2f Mi\n", "$1:", $2 * $size / 1048576);'
}
alias free=ViewMemory
@jwthomp
jwthomp / kubecontext.1s.py
Last active March 5, 2020 16:50
kubecontext.1s.py Update to work
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# <bitbar.title>Kubeconfig Context Changer</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Chris Opland</bitbar.author>
# <bitbar.author.github>copland</bitbar.author.github>
# <bitbar.desc>Displays active kubeconfig context and allows you to easily change contexts.</bitbar.desc>
# <bitbar.dependencies>python,kubectl</bitbar.dependencies>