Skip to content

Instantly share code, notes, and snippets.

View RyanCCollins's full-sized avatar

Ryan Collins RyanCCollins

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

Solarized

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 November 22, 2016 20:47
Install the latest working version of NodeJS in Docker with correct permissions.

Dockerfile

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

FROM node:4-onbuild
@RyanCCollins
RyanCCollins / docker-cheatsheet.md
Created January 17, 2016 23:55
Docker Cheatsheet

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
@RyanCCollins
RyanCCollins / npm-install-without-sudo.md
Created January 18, 2016 17:28
NPM Install without SUDO

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 November 22, 2016 20:47
Standard NodeJS config with NVM

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 January 24, 2016 03:20
How to install the hacksmith website

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
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"