Skip to content

Instantly share code, notes, and snippets.

View kvaps's full-sized avatar
🔳
This mess is mine!

Andrei Kvapil kvaps

🔳
This mess is mine!
View GitHub Profile
#docker network create --driver=bridge --ip-range=10.0.190.0/24 --subnet=10.0.0.0/16 --aux-address='ip1=10.0.190.1' --aux-address='ip2=10.0.190.2' --aux-address='ip3=10.0.190.3' -o "com.docker.network.bridge.name=br0" br0
#docker network create --driver=bridge --ip-range=10.36.60.0/16 --subnet=10.36.0.0/16 -o "com.docker.network.bridge.name=br0" internal
#docker network create -d macvlan \
# --subnet=172.16.86.0/24 \
# --gateway=172.16.86.1 \
# -o parent=eth0 pub_net
nginx:
image: nginx
container_name: nginx-container
environment:
- pipework_cmd=br0 @CONTAINER_NAME@ 10.36.60.1/16@10.36.0.1
pipework:
image: dreamcat4/pipework
restart: always
volumes:
@kvaps
kvaps / gist:90e95e23582b83258a01b91d642b24f1
Created July 9, 2017 19:08 — forked from nabla-c0d3/gist:715cdfe2ffb9d13726eb
MitM Script for XMPP StartTLS Stripping
#!/usr/bin/env python
import sys, socket, thread, ssl
from select import select
HOST = '0.0.0.0'
PORT = 5222
BUFSIZE = 4096
# Change this with the first two bytes of the SSL client hello
apt -y install golang
export GOROOT=$HOME/go
go get -d github.com/docker/swarmkit
cd ~/go/src/github.com/docker/swarmkit/
git checkout tags/v1.12.0
make binaries
cp bin/* /bin/
docker service create --name pipework --mode=global --mount=type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock --detach=false docker run --name pipework --rm -v /var/run/docker.sock:/docker.sock --privileged=true --pid=host --net=host -e run_mode=batch,daemon -e host_routes=true dreamcat4/pipework
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: ip-10.36.200.1
spec:
replicas: 1
template:
metadata:
labels:
app: externalIP
@kvaps
kvaps / vyos.sh
Created August 6, 2017 23:19 — forked from jbrodriguez/vyos.sh
#!/bin/vbash
# CONFIG
wan=dhcp
lan=192.168.1.1
lan_segment=192.168.1.0
vpn_segment=192.168.5.0
domain=apertoire.org
lease_start=192.168.1.200
lease_stop=192.168.1.245
var data = [
{
element: 'head title',
orig: '天鳳 / Web版',
translate: 'Tenhou / Web version',
},
{
element: 'a[href="http://tenhou.net/3/tr/"]',
orig: '【新機能】天鳳トレーニングβ(アプリ版Web版のみ)',
translate: '[New] Tianfeng Training β (Application version only for Web version)',
@kvaps
kvaps / Three-Node-LustreFS-Cluster-Quickstart.md
Last active October 9, 2017 16:57 — forked from joshuar/Three-Node-LustreFS-Cluster-Quickstart.md
Quick three-node Lustre set-up on CentOS 6
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: pipework
namespace: kube-system
labels:
app: pipework
spec:
template:
metadata: