Skip to content

Instantly share code, notes, and snippets.

View robbwagoner's full-sized avatar

Robb Wagoner robbwagoner

View GitHub Profile
@robbwagoner
robbwagoner / upgrade-pip-virtualenv.sh
Last active December 21, 2016 22:34
Ubuntu 14.04
sudo apt-get update
sudo apt-get install -y python-dev python-virtualenv virtualenvwrapper libffi-dev libssl-dev
source /etc/bash_completion.d/virtualenvwrapper
mkvirtualenv foo
pip install --upgrade pyopenssl ndg-httpsclient pyasn1 urllib3[secure]
pip install --upgrade pip
@robbwagoner
robbwagoner / socat.md
Last active November 17, 2017 17:28
nginx socket socat

https://github.com/p/redis-dump-load

sudo apt-get install python-virtualenv virtualenvwrapper libffi-dev libssl-dev
source /etc/bash_completion.d/virtualenvwrapper
mkvirtualenv redisdump
pip install --upgrade pip
pip install -U pyopenssl ndg-httpsclient pyasn1 urllib3[secure]
pip install redis redis-dump-load
@robbwagoner
robbwagoner / git-patch.sh
Last active August 10, 2017 17:16
Patching in Git
#
# Create patch from SHA
# http://stackoverflow.com/questions/6658313/generate-a-git-patch-for-a-specific-commit
# --stdout option is available, too
git format-patch -1 <sha>
#
# Apply Patch
# https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
@robbwagoner
robbwagoner / jmeter.md
Last active October 30, 2017 16:38
Install JMeter 3.0 into your home directory with JMeterPlugins

JMeter

Version 3.0

( set -e
cd /tmp
wget http://mirror.reverse.net/pub/apache//jmeter/binaries/apache-jmeter-3.0.tgz
wget https://www.apache.org/dist/jmeter/binaries/apache-jmeter-3.0.tgz.asc
wget -O - https://www.apache.org/dist/jmeter/KEYS |gpg --import
#!/usr/bin/env gawk
#
# Transform ELB access log to Apache/Nginx combined access log format - useful for replaying ELB logs with JMeter
#
BEGIN {
}
# ----
{
# 2016-04-20T15:05:39.777359Z elb_name 18.187.30.86:47983 10.0.11.143:80 0.000023 0.375377 0.000026 200 200 0 8853 "GET https://host.example.com:443/v1.1/listings?bounds[top_left][latitude]=34.055969&bounds[top_left][longitude]=-118.041738&bounds[bottom_right][latitude]=33.937845&bounds[bottom_right][longitude]=-117.918142&types=funstuff&limit=200 HTTP/1.1" "Dalvik/2.1.0 (Linux; U; Android 5.1; HTC Desire 626s Build/LMY47O)" ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2
@robbwagoner
robbwagoner / ec2-ubuntu-openssl-update.sh
Last active May 3, 2016 23:32
Update OpenSSL on EC2 Ubuntu instances Ansible with EC2 Dynamic Inventory
#!/bin/bash
# https://www.openssl.org/news/secadv/20160503.txt
# CVE-2016-2108
# http://www.ubuntu.com/usn/usn-2959-1/
ansible 'tag_environment_staging' -mapt -a 'name=openssl state=latest update_cache=yes' --become
#!/usr/bin/env python
#
# Simplistic RDS logfile downloader because AWS CLI + Botocore is broken. :-(
#
from __future__ import print_function
import argparse
import os.path
import sys
#!/usr/bin/env python
#
# Simplistic RDS logfile downloader because AWS CLI + Botocore is broken. :-(
#
from __future__ import print_function
import argparse
import os.path
import sys
@robbwagoner
robbwagoner / roles_ec2-facts_defaults_main.yml
Last active December 9, 2015 18:08
ec2-facts Ansible role with derived facts
---
ec2_facts_vpc_network_prefix: "172."
# derived facts
ansible_ec2_in_vpc: no