Skip to content

Instantly share code, notes, and snippets.

View foxish's full-sized avatar
🎯
Focusing

Anirudh Ramanathan foxish

🎯
Focusing
View GitHub Profile
@foxish
foxish / dynamic_fwd_http_sni.yaml
Created April 14, 2021 15:21 — forked from skiptomyliu/dynamic_fwd_http_sni.yaml
Dynamic Forward Proxy HTTP + SNI
# Transparent Envoy Proxy that forwards http/https
# Create iptables to route 80 + 443 to 10000:
# $ iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner envoyuser --dport 443 -j REDIRECT --to-port 10000
# $ iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner envoyuser --dport 80 -j REDIRECT --to-port 10000
# Run envoy
# $ envoy -c dynamic_fwd_http_sni.yaml -l debug
admin:
access_log_path: /home/envoyuser/admin/admin_access.log
address:
@foxish
foxish / zoonavigator.docker-compose.yml
Created June 14, 2018 19:18 — forked from elkozmon/zoonavigator.docker-compose.yml
Docker compose file for ZooNavigator with Zookeeper
version: '2.1'
services:
web:
image: elkozmon/zoonavigator-web:latest
container_name: zoonavigator-web
ports:
- "8000:8000"
environment:
API_HOST: "api"
##################### ElasticSearch Configuration Example #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
#
# ElasticSearch comes with reasonable defaults for most settings,
@foxish
foxish / gist:e48b223d1d8067308e572c0285f6b400
Created November 27, 2017 04:34 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@foxish
foxish / mongo.md
Last active August 9, 2016 09:07 — forked from bprashanth/mongo.md
Mongo petset

MongoDB is document database that supports range and field queries (https://github.com/foxish/docker-mongodb/tree/master/kubernetes)

Concepts

Replication

A single server can run either standalone or as part of a replica set. A "replica set" is set of mongod instances with 1 primary. Primary: receives writes, services reads. Can step down and become secondary. Secondary: replicate the primary's oplog. If the primary goes down, secondaries will hold an election.

@foxish
foxish / Makefile
Created August 8, 2014 14:21 — forked from prwhite/Makefile
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
# Source: http://coffeeghost.net/2010/10/09/pyperclip-a-cross-platform-clipboard-module-for-python/
# Pyperclip v1.3
# A cross-platform clipboard module for Python. (only handles plain text for now)
# By Al Sweigart al@coffeeghost.net
# Usage:
# import pyperclip
# pyperclip.copy('The text to be copied to the clipboard.')
# spam = pyperclip.paste()