Skip to content

Instantly share code, notes, and snippets.

View allen-munsch's full-sized avatar
⁉️

James allen-munsch

⁉️
View GitHub Profile
@pawl
pawl / readme.md
Last active January 8, 2023 13:39
test to see if psycogreen is necessary to run sqlalchemy + gevent + psycopg2 concurrently

This is a test to see if psycogreen is necessary to run sqlalchemy + gevent + psycopg2 concurrently.

benchmark command (concurrency of 10)

ab -n 10 -c 10 127.0.0.1:8080/wait

psychopg2 - sync worker (expecting concurrency of 2)

gunicorn -b 127.0.0.1:8080 -w 2 test:app

@MitchRatquest
MitchRatquest / forward
Last active April 17, 2019 14:09
iptables forwarding script, basic and working
#!/bin/bash
if [ $UID != 0 ]; then echo "Please run as root"; exit 1; fi
SUBNET_ADDRESS='10.0.0.1'
SUBNET_RANGE='10.0.0.2,10.0.0.100,12h'
INTERNET="eno1" #upstream
SUBNET="enp7s0f0" #downstream
ifconfig "$SUBNET" "$SUBNET_ADDRESS" #set your ip for downstream
#ip addr add "$SUBNET_ADDRESS" dev "$SUBNET"
#!/usr/bin/env bash
# Given a commit sha (defaults to current commit), creates PRs for every
# branch on the stack of the given commit. Each PR is created with its base
# as the nearest ancestor of the given branch that is also a branch.
set -euo pipefail
commit="${1:-.}"
base="$(git config branchless.core.mainBranch)"
remote="origin"