Skip to content

Instantly share code, notes, and snippets.

View gist:d89ca1a2f8530378ca73
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
View yet-another-option.sh
# install node wherever.
# use sudo even, it doesn't matter
# we're telling npm to install in a different place.
#for youtube_12
echo prefix = ~/local >> ~/.npmrc
# curl https://npmjs.org/install.sh | sh
# use this below instead to avoid install.sh newline error
curl -O https://www.npmjs.org/install.sh
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # this steps takes many minutes
# curl https://npmjs.org/install.sh | sh
# use this below instead to avoid install.sh newline error
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh