Skip to content

Instantly share code, notes, and snippets.

@mafo5
Forked from StephanU/work.sh
Created January 9, 2012 08:54
Show Gist options
  • Save mafo5/1582044 to your computer and use it in GitHub Desktop.
Save mafo5/1582044 to your computer and use it in GitHub Desktop.
npm/proxy skript
#!/bin/sh
proxy=proxy.clust:3128
export http_proxy=http://$proxy
export https_proxy=http://$proxy
export ftp_proxy=http://$proxy
export socks_proxy=http://$proxy
export no_proxy="127.0.0.1,localhost"
#!/bin/sh
export http_proxy=
export https_proxy=
export ftp_proxy=
export socks_proxy=
mv ~/.ssh/config ~/.ssh/config_hsh
#!/bin/sh
. ~/bin/proxy.sh
. <path to nvm>/nvm/nvm.sh
nvm use stable
mv ~/.ssh/config_hsh ~/.ssh/config
npm config set registry http://registry.npmjs.org/
export NODE_PATH="$(npm root -g)"
@mafo5
Copy link
Author

mafo5 commented Jan 9, 2012

Important:

You have to set "stable" in nvm over the alias function!

@mafo5
Copy link
Author

mafo5 commented Feb 20, 2012

added line to work.sh for npm behind proxy from https://github.com/isaacs/npm/issues/1335

@mafo5
Copy link
Author

mafo5 commented May 10, 2012

added NODE_PATH so the "install -g" modules can be used in node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment