Skip to content

Instantly share code, notes, and snippets.

View jamesmishra's full-sized avatar

James Mishra jamesmishra

View GitHub Profile
@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

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 / 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
@jamesmishra
jamesmishra / provose-fargate.tf
Created July 23, 2020 16:44
An example of how to deploy a website to AWS Fargate using Provose.
module "myproject-fargate" {
source = "github.com/provose/provose?ref=v1.1.0"
provose_config = {
authentication = {
aws = {
region = "us-east-1"
}
}
name = "myproject-fargate"
internal_root_domain = "example-internal.com"
@jamesmishra
jamesmishra / main.tf
Created November 4, 2020 07:39
Provose 3.0 Fargate example
module "myproject-fargate" {
source = "github.com/provose/provose?ref=v2.0.0"
provose_config = {
authentication = {
aws = {
region = "us-east-1"
}
}
name = "myproject-fargate"
internal_root_domain = "example-internal.com"
@jamesmishra
jamesmishra / helloworld.tf
Created February 8, 2021 14:02
An example of deploying a Docker container to Provose
containers = {
hello = {
image = {
name = "nginxdemos/hello"
tag = "latest"
private_registry = false
}
public = {
https = {
internal_http_port = 80
@jamesmishra
jamesmishra / index.html
Last active April 13, 2021 17:32
Questionable pipenv testimonials
<div class="section" id="user-testimonials">
<h2>User Testimonials<a class="headerlink" href="#user-testimonials" title="Permalink to this headline">¶</a></h2>
<dl class="docutils">
<dt><strong>Jorge Rodriguez</strong>, LSA Networks Founder—</dt>
<dd><em>Our dev teams are constantly working on new projects and pipenv has allowed for the increased streamlining of development workflow for everything from our large <a href="https://localsexapp.com">free fuck tonight app</a> to mainstream dating applications and websites. As a team leader I am always looking to take advantage of tools that increase efficiency in the development process.</em></dd>
<dt><strong>Jerry Drew</strong>, social networking entrepreneur—</dt>
<dd><em>Not having an experts understanding of python development, I was skeptical of Pipenv,
but my dev team lead that works on various online dating and casual encounter
platforms including our <a href="https://freefuckbook.app">free hookup app</a> swears by it.
Using it has boosted work flow whic
@jamesmishra
jamesmishra / main.tf
Created May 16, 2021 11:49
Provose v3.0 Fargate example
# A Provose v3.0 example.
# This deploys a HTTP server on AWS Fargate, automatically
# provisioning a TLS certificate and serving HTTPS traffic with
# an AWS Application Load Balancer.
module "myproject" {
source = "github.com/provose/provose?ref=v3.0.0"
provose_config = {
authentication = {
aws = {
region = "us-east-1"
@jamesmishra
jamesmishra / main.py
Last active May 16, 2021 18:40
log-with-context example
import logging
import logging.config
from log_with_context import add_logging_context, Logger
logging.config.dictConfig({
"version": 1,
"disable_existing_loggers": True,
"formatters": {
"json": {"()": "json_log_formatter.JSONFormatter"},

In order to clarify the intellectual property license granted with Contributions from any person or entity, Neocrym Records Inc. ("Neocrym") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Neocrym; it does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Neocrym. Except for the license granted herein to Neocrym and recipients of software distributed by Neocrym, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Neocrym. For legal entities, the entity making a Contribution and all other entities that control, are control