Skip to content

Instantly share code, notes, and snippets.

@bparli
bparli / nitro_repos.py
Last active May 1, 2019 21:00
Scripts to migrate repos from github enterprise to github public
#!/usr/bin/python
from github import Github
import os, subprocess, sys, getopt
from sys import argv
with open("repos") as fp:
repos = [x.strip('\n') for x in fp.readlines()]
user = ''
pw = ''
@bparli
bparli / nginx.conf
Last active May 10, 2021 18:38
Basic nginx config for load balancer benchmark
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@bparli
bparli / haproxy.cfg
Created February 9, 2019 17:02
Basic Haproxy config for load balancer benchmark
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon
@bparli
bparli / test_file_server.go
Created March 30, 2020 00:28
File server for testing cache performance
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
@bparli
bparli / create_dummy_files.sh
Created March 30, 2020 00:32
script to create a directory of dummy files for testing cache performance
#! /bin/bash
for n in {0..1000}; do
dd if=/dev/urandom of=file$( printf %03d "$n" ).bin bs=1 count=$(( RANDOM*100 + 2048 ))
done
@bparli
bparli / client_downloader.go
Last active April 5, 2020 18:11
download files to test cache performance
package main
import (
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"strconv"
"time"
@bparli
bparli / Vagrantfile
Created May 10, 2021 16:17
Vagrantfile for testing convey project
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@bparli
bparli / convey_tests.yaml
Created June 9, 2021 03:48
Cloudformation template for Convey Test/Benchmarks
AWSTemplateFormatVersion: '2010-09-09'
Description: Convey Test/Benchmark Environment
Parameters:
AmiId:
Type: String
Default: 'ami-03d5c68bab01f3496'