Skip to content

Instantly share code, notes, and snippets.

View evanharmon's full-sized avatar

Evan Harmon evanharmon

View GitHub Profile
@evanharmon
evanharmon / Router.js
Created August 12, 2019 20:59 — forked from dabit3/Router.js
Router implementation for React Authentication
import React from 'react'
import {
withRouter,
Switch,
Route,
Redirect,
BrowserRouter as Router
} from 'react-router-dom'
import { Auth } from 'aws-amplify'
@evanharmon
evanharmon / userdata-nvm.sh
Created July 6, 2017 16:20 — forked from matthewflanneryaustralia/userdata-nvm.sh
Install NVM via ec2 userdata
cat > /tmp/subscript.sh << EOF
# START UBUNTU USERSPACE
echo "Setting up NodeJS Environment"
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc
# Dot source the files to ensure that variables are available within the current shell