Skip to content

Instantly share code, notes, and snippets.

View jamesmishra's full-sized avatar

James Mishra jamesmishra

View GitHub Profile
@jamesmishra
jamesmishra / README.md
Last active March 25, 2024 20:02
Using Terraform to run a docker-compose.yml file directly on an Amazon EC2

Introduction

This is a Hashicorp Terraform module that provisions an AWS EC2 instance for the purpose of running a given docker-compose.yml file.

Usage

# ===== OUR MAGIC DOCKER-COMPOSE.YML FILE HERE =====
# It is also possible to get Terraform to read an external `docker-compose.yml`
# file and load it into this variable.
# We'll be showing off a demo nginx page.
@jamesmishra
jamesmishra / Dockerfile
Created February 1, 2020 09:51
Record and replay fixtures for your Python tests with mitmproxy
FROM python:3.8-buster
WORKDIR /code
# Don't run as root.
RUN groupadd -r baphomet \
&& useradd -m -d /home/baphomet -s /bin/bash -g baphomet baphomet
RUN wget -q https://snapshots.mitmproxy.org/5.0.1/mitmproxy-5.0.1-linux.tar.gz -O mitmproxy.tar.gz \
&& tar xvf mitmproxy.tar.gz \
&& mv mitmdump mitmproxy mitmweb /bin \
&& rm mitmproxy.tar.gz

Keybase proof

I hereby claim:

  • I am jamesmishra on github.
  • I am jamesmishra (https://keybase.io/jamesmishra) on keybase.
  • I have a public key ASBUpv2OPgoPcgGhrCQ5auTQtdtb32qNxCv7QTIPuf8rIgo

To claim this, I am signing this object:

@jamesmishra
jamesmishra / install_mongodb_ubuntu.sh
Created June 16, 2014 22:12
Install MongoDB on Ubuntu
#!/bin/bash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update && sudo apt-get install mongodb-org