Created
February 25, 2022 01:04
-
-
Save daluu/9b0c914eba9fea548e61a6cc685b6689 to your computer and use it in GitHub Desktop.
Notes for Mac and shell cmds/scripts
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
shopt -s globstar | |
alias get-checksum='cd $1; find -type f -exec md5sum {} + | tee $2; cd -' | |
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } | |
alias speedtest='wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip' | |
alias fixvpn="sudo route -n flush && sudo networksetup -setv4off Wi-Fi && sudo networksetup -setdhcp Wi-Fi" | |
# for Mac | |
flushdns(){ | |
sudo killall -HUP mDNSResponder | |
} | |
#ulimit -n 65536 | |
#ulimit -u 2048 | |
# to check JAVA_HOME on Mac: /usr/libexec/java_home [-v 1.6] | |
#export JAVA_HOME=`/usr/libexec/java_home` | |
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment