Skip to content

Instantly share code, notes, and snippets.

View jningtho's full-sized avatar

Jassy Ningthoujam jningtho

View GitHub Profile
@jningtho
jningtho / web-servers.md
Created March 14, 2018 18:30 — 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
@jningtho
jningtho / docker-cleanup-resources.md
Created March 14, 2018 03:30 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jningtho
jningtho / howto.md
Created January 25, 2018 15:41 — forked from adamcharnock/howto.md
Kubernetes install on Ubuntu 17.10 via kubeadm

Kubernetes install on Ubuntu 17.10 via kubeadm

Initial setup

apt-get update
apt-get upgrade
apt-get install curl

# Check VXLAN exists
@jningtho
jningtho / jenkins-cloudformation-template.template
Last active January 23, 2018 10:07
jenkins-cloudformation-template
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Launches a Jenkins server.",
"Parameters": {
"InstanceType": {
"Description": "EC2 instance type",
"Type": "String",
"Default": "t2.small",
"AllowedValues": [
"t1.micro",
@jningtho
jningtho / Dockerfile
Created January 11, 2018 10:55 — forked from tmaiaroto/Dockerfile
WordPress on Amazon ECS
FROM alpine:3.3
MAINTAINER Tom Maiaroto <tom@outdoorsy.co>
# Install packages
RUN apk --update --repository http://dl-3.alpinelinux.org/alpine/edge/main add \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
php7 \
@jningtho
jningtho / gist:c100f2836bd49c33904a658c8b4912dc
Created December 3, 2017 11:13 — forked from mikepfeiffer/gist:6f9e6cac7607fc365874cd7d31dbb141
Example to Create AWS ELB, Launch Config, and Auto Scaling Group
aws elb create-load-balancer \
--load-balancer-name MyELB \
--listeners Protocol=TCP,LoadBalancerPort=80,InstanceProtocol=TCP,InstancePort=80 \
--subnets subnet-46e6506c subnet-57b8010f \
--scheme internet-facing \
--security-groups sg-aec570d4
aws autoscaling create-launch-configuration \
--launch-configuration-name MyLC \
--key-name virginia \
@jningtho
jningtho / .block
Created October 30, 2017 17:49
fresh block
license: mit
@jningtho
jningtho / .block
Created September 29, 2017 09:57 — forked from mbostock/.block
Every ColorBrewer Scale
license: gpl-3.0
@jningtho
jningtho / .block
Created September 29, 2017 09:57 — forked from mbostock/.block
Every ColorBrewer Scale
license: gpl-3.0
@jningtho
jningtho / gist:33417621d2d06bc398cc46bb423a2202
Created September 16, 2017 18:47 — 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