This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Checks my mac's Wi-Fi every 5 seconds. | |
# If it's down, restart the adapter. | |
while : | |
do | |
if [ $(networksetup -getinfo Wi-Fi | grep -c 'IP address:') = '1' ] | |
then | |
$(networksetup -setairportpower en1 off) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSNotificationCenter *center; | |
center = [NSNotificationCenter defaultCenter]; | |
token = [center addObserverForName: nil | |
object: nil | |
queue: nil | |
usingBlock: ^(NSNotification *notification) { | |
QuietLog (@"NOTIFICATION %@ -> %@", | |
notification.name, notification.userInfo); | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find / -type f -name '*.jar' -exec grep -l '[ClassName].class' '{}' \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch -p && git branch -vv | gawk "/: gone]/{print $1}" | xargs git branch -d |