-
-
Save mafo5/1582044 to your computer and use it in GitHub Desktop.
npm/proxy skript
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
#!/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" |
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
#!/bin/sh | |
export http_proxy= | |
export https_proxy= | |
export ftp_proxy= | |
export socks_proxy= | |
mv ~/.ssh/config ~/.ssh/config_hsh |
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
#!/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)" |
added line to work.sh
for npm behind proxy from https://github.com/isaacs/npm/issues/1335
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
Important:
You have to set "stable" in nvm over the alias function!