Skip to content

Instantly share code, notes, and snippets.

@melvinrr25
melvinrr25 / web-servers.md
Created November 9, 2018 14:16 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@melvinrr25
melvinrr25 / appspec.yml
Created October 27, 2018 16:11 — forked from moshest/appspec.yml
Node.js Project on AWS CodeDeploy CentOS
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/node
permissions:
- object: /home/ec2-user
owner: ec2-user
group: ec2-user
type:
@melvinrr25
melvinrr25 / gist:a39f5bc476f48aa66a3101649b8f6937
Created October 22, 2018 14:07 — forked from mikepfeiffer/gist:4d9386afdcceaf29493a
EC2 UserData script to install CodeDeploy agent
#!/bin/bash
yum install -y aws-cli
cd /home/ec2-user/
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1
yum -y install codedeploy-agent.noarch.rpm

Setting up Sinatra Project

create an empty project and add a Gemfile

cd ~/Desktop
mkdir project-name
cd project-name
touch Gemfile