Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Van Gheem vangheem

View GitHub Profile
View gist:ec00bdceab1e9e48778500e3d9f9f1fe
### Keybase proof
I hereby claim:
* I am vangheem on github.
* I am vangheem (https://keybase.io/vangheem) on keybase.
* I have a public key ASDWwYJREMp_Tw9pG4omwj4mnLOTJ2a5t5m0CtNRsmmxsQo
To claim this, I am signing this object:
View rocksdb-Dockerfile
FROM ubuntu:18.04
RUN apt-get update && apt-get -y upgrade && apt-get install -y openssh-server vim \
build-essential htop locales cron rsync libssl-dev libffi-dev tmux git gcc libreadline-dev \
curl httpie wget clang-3.9 lldb-3.9 cmake sudo iputils-ping apt-transport-https \
libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libsqlite3-dev
RUN locale-gen en_US.UTF-8
RUN mkdir /var/run/sshd
RUN groupadd developers && useradd --shell /bin/bash --create-home --home-dir /home/developers -g developers developers
View service-loader.py
# Usage
# python load.py http://localhost:8080 --concurrency=100 --total=10000
import asyncio
import time
from functools import partial
import aiohttp
import argparse
parser = argparse.ArgumentParser(description='Process some integers.')
@vangheem
vangheem / cpu_bound_flask.py
Created Jun 11, 2019
Simple CPU bound flask app
View cpu_bound_flask.py
# ./bin/uwsgi --http 127.0.0.1:5000 --module cpu_bound_flask:app
from flask import Flask
import time
DURATION = 0.5
app = Flask(__name__)