nvm use v0.12.6
# source ~/.bashrc
alias sublime='open -a "Sublime Text"'
alias wifion='networksetup -setairportpower en1 on'
alias wifioff='networksetup -setairportpower en1 off'
alias whoispsid='ps -p'
alias reoutlook='pgrep Outlook | xargs kill;open -a "Microsoft Outlook"'
#helpers 4 myaxa
alias swagger='open -a "Google Chrome" "https://0.0.0.0:3000/explorer"'
#Settings for countries
clear-proxy(){
unset http_proxy
unset https_proxy
unset HTTPS_PROXY
unset HTTP_PROXY
echo "Checking environment for proxy variables"
env | grep -i proxy
}
set-proxy(){
export http_proxy=http://192.168.62.5:3128
export https_proxy=http://192.168.62.5:3128
export HTTPS_PROXY=http://192.168.62.5:3128
export HTTP_PROXY=http://192.168.62.5:3128
}
belgica(){
clear-proxy
networksetup -switchtolocation "Wifi"
networksetup -setairportpower en1 on
echo You are over WiFi without proxy settings
echo "Checking environment for proxy variables"
env | grep -i proxy
alias MYAXA-HOME='cd ~/Projects/mw-myaxa-be'
export share_ssl_crt='/Users/Shared/MIT/config-ssl/be_cert.pem'
export share_ssl_key_pem='/Users/Shared/MIT/config-ssl/be_key.pem'
}
españa(){
belgica
alias MYAXA-HOME='cd ~/Projects/mw-myaxa-es'
export share_ssl_crt='/Users/Shared/MIT/config-ssl/api_es_clcert.pem'
export share_ssl_key_pem='/Users/Shared/MIT/config-ssl/api_es_openkey.pem'
}
axa(){
export http_proxy=http://192.168.62.5:3128
export https_proxy=http://192.168.62.5:3128
export HTTPS_PROXY=http://192.168.62.5:3128
export HTTP_PROXY=http://192.168.62.5:3128
networksetup -setairportpower en1 off
networksetup -switchtolocation "Ethernet Only"
echo You are over Ethernet with proxy settings
echo "Checking environment for proxy variables"
env | grep -i proxy
reoutlook
alias MYAXA-HOME='cd ~/Projects'
}