-
-
Save Cloudxtreme/d6f79a54be13060bb6d61dd05d54a859 to your computer and use it in GitHub Desktop.
Revisions
-
jameswomack revised this gist
Jan 14, 2014 . 1 changed file with 7 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/C CURRENT_WIFI_SSID=$(eval airport -I | grep '^[[:space:]]*SSID' | sed -e 's/^.*SSID: //g') proxy() { export addy='http://www-west.sony.com:80' git config --global http.proxy $addy git config --global https.proxy $addy npm config set http-proxy $addy @@ -15,15 +15,16 @@ proxy() { } noproxy() { export addy='' git config --global --unset-all http.proxy git config --global --unset-all https.proxy npm config delete http-proxy npm config delete https-proxy export HTTP_PROXY=$addy export HTTPS_PROXY=$addy export http_proxy=$HTTP_PROXY echo 'Not using proxy' } [[ $CURRENT_WIFI_SSID != 'SWing' ]] && noproxy > /dev/null [[ $CURRENT_WIFI_SSID == 'SWing' ]] && proxy > /dev/null -
jameswomack revised this gist
Jan 14, 2014 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/C CURRENT_WIFI_SSID=$(eval airport -I | grep '^[[:space:]]*SSID' | sed -e 's/^.*SSID: //g') proxy() { local addy='http://www-west.sony.com:80' git config --global http.proxy $addy git config --global https.proxy $addy npm config set http-proxy $addy @@ -25,6 +25,5 @@ noproxy() { echo 'Not using proxy' } [[ $CURRENT_WIFI_SSID != 'SWing' ]] && "$(noproxy)" 2> /dev/null [[ $CURRENT_WIFI_SSID == 'SWing' ]] && "$(proxy)" 2> /dev/null -
jameswomack revised this gist
Jan 14, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport" CURRENT_WIFI_SSID=$(eval airport -I | grep '^[[:space:]]*SSID' | sed -e 's/^.*SSID: //g') proxy() { -
jameswomack created this gist
Jan 14, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ CURRENT_WIFI_SSID=$(eval airport -I | grep '^[[:space:]]*SSID' | sed -e 's/^.*SSID: //g') proxy() { local addy='http://www.proxy.com:3000' git config --global http.proxy $addy git config --global https.proxy $addy npm config set http-proxy $addy npm config set https-proxy $addy export HTTP_PROXY=$addy export HTTPS_PROXY=$addy export http_proxy=$HTTP_PROXY echo 'Using proxy' } noproxy() { git config --global --unset-all http.proxy git config --global --unset-all https.proxy npm config delete http-proxy npm config delete https-proxy unset HTTP_PROXY unset HTTPS_PROXY unset http_proxy echo 'Not using proxy' } [[ $CURRENT_WIFI_SSID != 'YourSSID' ]] && echo "$(noproxy)" [[ $CURRENT_WIFI_SSID == 'YourSSID' ]] && echo "$(proxy)"