Skip to content

Instantly share code, notes, and snippets.


Derek Mullins drkmullins

View GitHub Profile
drkmullins / gitCleanup
Created Mar 13, 2017
Deletes local branches that no longer exist on the remote
View gitCleanup
git fetch -p && git branch -vv | gawk "/: gone]/{print $1}" | xargs git branch -d
drkmullins / findJar
Created Jul 25, 2013
This will find a given class name's jar
View findJar
find / -type f -name '*.jar' -exec grep -l '[ClassName].class' '{}' \;
View NotificationSpy
NSNotificationCenter *center;
center = [NSNotificationCenter defaultCenter];
token = [center addObserverForName: nil
object: nil
queue: nil
usingBlock: ^(NSNotification *notification) {
QuietLog (@"NOTIFICATION %@ -> %@",, notification.userInfo);
drkmullins /
Last active Dec 16, 2015
Checks my macbook's Wi-Fi every 5 seconds. If it's down, it restarts the adapter. I use it when my Wi-Fi signal is flaky and my macbook is having issues staying connected.
# Checks my mac's Wi-Fi every 5 seconds.
# If it's down, restart the adapter.
while :
if [ $(networksetup -getinfo Wi-Fi | grep -c 'IP address:') = '1' ]
$(networksetup -setairportpower en1 off)