Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Ryan Collins RyanCCollins

🎯
Focusing
View GitHub Profile
@RyanCCollins
RyanCCollins / category_plugin.rb
Created Oct 21, 2015 — forked from somic/category_plugin.rb
How I organize posts in Jekyll (code snippets for blog post - see comments)
View category_plugin.rb
module Jekyll
Page.class_eval {
def clone
Page.new(@site, @base, @dir, @name)
end
}
@RyanCCollins
RyanCCollins / Gruntfile.js
Created Jan 16, 2016
How to start mongo with Grunt
View Gruntfile.js
shell: {
mongo: {
command: "sh startMongoIfNotRunning.sh",
options: {
async: true
}
},
}
@RyanCCollins
RyanCCollins / iterm2-solarized.md
Created Jan 16, 2016 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)
View install-nvm.md

Install NVM to manage NodeJS versions

Download and Install

Download and run the install script using curl:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash

or use wget:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
@RyanCCollins
RyanCCollins / install-node-js-docker.md
Last active Nov 22, 2016
Install the latest working version of NodeJS in Docker with correct permissions.
View install-node-js-docker.md

Dockerfile

#
# Node.js Dockerfile
#
# https://github.com/dockerfile/nodejs
#

FROM node:4-onbuild
View docker-cheatsheet.md

Remove all containers:

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Inspect a container and Network bridging:

docker inspect
docker network inspect
View npm-install-without-sudo.md

NPM install without SUDO

It's easy! Just change permissions on the .npm directory as shown below.

Try this:

sudo chown -R $(whoami) ~/.npm

Or this:

@RyanCCollins
RyanCCollins / Node_config.md
Last active Nov 22, 2016
Standard NodeJS config with NVM
View Node_config.md

Node configuration.

Update NPM version with the following command

npm update -g npm

Download NVM (Node Version Manager), which will help you to use the correct version of NodeJS

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
@RyanCCollins
RyanCCollins / Install-hacksmith-website.md
Created Jan 24, 2016
How to install the hacksmith website
View Install-hacksmith-website.md

First, install nodeJS:


Then, make a new folder called uhubprojects, or whatever, and clone the project to your local computer by running

git clone https://github.com/u-hub/hacksmiths hacksmiths
View oneline-packer-install.sh
curl -O -L https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_darwin_amd64.zip
unzip packer_0.8.6_darwin_amd64.zip
sudo mv packer_0.8.6 /usr/local/packer
sudo chown $USER /usr/local/packer/
# then update your .bash_profile with the new path e.g.:
# export PATH="/usr/local/git/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/local/packer:$PATH"