Skip to content

Instantly share code, notes, and snippets.

Chad Brewbaker chadbrewbaker

Block or report user

Report or block chadbrewbaker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chadbrewbaker / sysinfo
Created Feb 7, 2019
Getting Cache/SIMD parameters on OSX
View sysinfo
sysctl -a #OSX
hw.cachesize: 8589934592 32768 262144 3145728 0 0 0 0 0 0
hw.pagesize: 4096
hw.busfrequency: 100000000
hw.busfrequency_min: 100000000
hw.busfrequency_max: 100000000
hw.cpufrequency: 2400000000
hw.cpufrequency_min: 2400000000
hw.cpufrequency_max: 2400000000
hw.cachelinesize: 64
chadbrewbaker / z3
Created Feb 3, 2019
z3 interception
View z3
cat - | tee -a /tmp/z3in.log | /usr/local/bin/z3 $@ | tee -a /tmp/z3out.log
chadbrewbaker /
Created Jan 26, 2019
benchmark all the things in the directories without xargs shenanigans
import os
import time
for root, dirs, files in os.walk("."):
for file in files:
if file.endswith(".smt2"):
start = time.time()
if os.system("gtimeout 5 cvc4 "+ file) == 0:
end = time.time()
chadbrewbaker / Makefile
Created Jan 18, 2019
Do thing in the Docker container
View Makefile
docker run --rm \
-v `pwd`:/opt \
some_docker_container \
/bin/bash -c 'echo do the thing > /opt/thing_result.txt'
chadbrewbaker / AWSLatency.txt
Last active Jan 11, 2019
AWS Latency Numbers Every Engineer Should Know
View AWSLatency.txt
Lambda statup latency
Lambda IO bandwidth
Lambda IO + CPU bandwidth for SORT
S3 read latency
S3 read bandwidth
from selenium import webdriver
from import Options
import time
chrome_options = Options()
dest = ""
while True:
chadbrewbaker /
Created Apr 29, 2018
Simple driver to profile infinite scroll twitter
from selenium import webdriver
from import Options
import time
chrome_options = Options()
browser = webdriver.Chrome(chrome_options=chrome_options)
while True:
chadbrewbaker /
Created Feb 16, 2018
Script for SecDSM MiniCTF
from PIL import Image
import io
import base64
import pytesseract
URI = ''
from subprocess import call
import urllib
import urllib2
response = urllib2.urlopen(URI)
html =
chadbrewbaker /
Created Mar 4, 2017
Example of how to called a shared object file on OSX
import ctypes
libc = ctypes.cdll.LoadLibrary("/usr/lib/libc.dylib")
print libc.div(9,3)
You can’t perform that action at this time.