Skip to content

Instantly share code, notes, and snippets.

View taytayevanson's full-sized avatar

Taylor Evanson taytayevanson

  • Salt Lake City, UT
View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active July 21, 2024 01:20
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
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://www.npmjs.org/install.sh | sh
#!/bin/bash
PHANTOM_JS="phantomjs-1.9.8-linux-x86_64"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
else
apt-get update
apt-get install -y build-essential chrpath libssl-dev libxft-dev
apt-get install -y libfreetype6 libfreetype6-dev
apt-get install -y libfontconfig1 libfontconfig1-dev
@jordancalder
jordancalder / gist:561b0f6a721d7223f200
Created January 13, 2015 21:48
Git Overwrite Local Conflicts - Leave Other Local Changes Alone
git add *
git commit -m "commit message"
//Fetch changes and overwrite local conflicts
git fetch origin master
git merge -s recursive -X theirs origin/master
@jordancalder
jordancalder / gist:2fd88361385243a15ead
Created March 20, 2015 20:45
Create repo from CLI (Add to ~/.bash_profile)
github-repo() {
repo_name=$1
dir_name=`basename $(pwd)`
if [ "$repo_name" = "" ]; then
echo "Repo name (hit enter to use '$dir_name')?"
read repo_name
fi
if [ "$repo_name" = "" ]; then