Skip to content

Instantly share code, notes, and snippets.

View bcreasy's full-sized avatar

Brian Creasy bcreasy

View GitHub Profile
@bcreasy
bcreasy / gist:6465456
Last active December 22, 2015 11:28
fix mac dns lookup
sudo sed -i .orig 's/\(<string>\/usr\/sbin\/mDNSResponder<\/string>\)/\1\
<string>-AlwaysAppendSearchDomains<\/string>/
' /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
@bcreasy
bcreasy / setjdk.sh
Last active December 16, 2015 10:49
bash script to switch the symlink that PATH and JAVA_HOME use for the JDK currently in use
if [[ -d /opt/build/resources/jdk ]]; then
servertype="build"
else
servertype="code"
fi
jdkpath=/opt/$servertype/resources/jdk/jdk
export PATH=$jdkpath/bin:$PATH
export JAVA_HOME=$jdkpath