Skip to content

Instantly share code, notes, and snippets.

View bsradcliffe's full-sized avatar

Ben Radcliffe bsradcliffe

View GitHub Profile
@bsradcliffe
bsradcliffe / set_proxy.sh
Last active May 4, 2016 14:15 — forked from manekinekko/set_proxy.sh
Toggling Proxy Settings for Git, NPM, Bower and Package Control (Mac OS X) automatically
#! /bin/sh
# Configure the below variables with your respective Keychain and proxy information
# Grabs your user password from Keychain
export SECRET="`security find-generic-password -w -s <PASSWORD_PROFILE>`"
AUTH="$USER:$SECRET"
PROXY='<http://PROXY:PORT>'
AUTH_PROXY=<'http://'$AUTH'@PROXY:PORT>'
if [ "$1" == "on" ]; then