Skip to content

Instantly share code, notes, and snippets.

View shawnsi's full-sized avatar

Shawn Siefkas shawnsi

View GitHub Profile
@shawnsi
shawnsi / Makefile
Last active December 13, 2015 17:28
ImageMagick Makefile - Solaris 10
# Parallelization
CORES?=1
# Configure Command
PREFIX?=/usr/local
AS=${PREFIX}/bin/as
LD=${PREFIX}/bin/ld
CPPFLAGS=-I${PREFIX}/include
LDFLAGS=-L${PREFIX}/lib:/usr/lib -R${PREFIX}/lib:/usr/lib -lsocket
CONFIGURE=./configure --prefix=${PREFIX}
@shawnsi
shawnsi / gist:5222443
Last active December 15, 2015 07:19
Docker -d crash info (Issue #97)

Issue #97

Quick rundown of my experience with moby/moby#97

The docker binary is built with the development environment instructions in the README. I move the binary into /usr/local/bin in the vagrant vm and restart the dockerd service.

Cause

All is well until I start a container with port forwarding like so. Any image, any port, and any command seem to cause the problem.

@shawnsi
shawnsi / gist:5256438
Created March 27, 2013 17:41
Setting up a docker bridge on Arch

Up

brctl addbr dockbr0
ip a add 172.16.0.1/24 dev dockbr0
ip link set dockbr0 up

Down

@shawnsi
shawnsi / tid.tcl
Last active August 29, 2015 14:08
F5 Transaction ID
when HTTP_REQUEST {
# Initialize the hex string variable
set hex ""
# Loop to create 8 random bytes
for {set i 0} {$i<8} {incr i} {
# Create a byte from the PRNG
set byte [expr { int(rand() * 256) }]
@shawnsi
shawnsi / pacdiff.sh
Created November 20, 2014 17:18
Backups to supplement Pacman based restores
#!/bin/bash
#
# Creates a tarsnap backup of all files we can't reasonably expect to get back
# from pacman. Files matching these conditions are included:
#
# 1. located in /etc and not owned by any package
# 2. owned by a package and modified since installation
# Create temporary space
INCLUDES=$(mktemp)
@shawnsi
shawnsi / gist:0ea9127d4f9be6bf2fcc
Created December 2, 2014 22:51
Apache Proxy for Spring Security
NameVirtualHost IP:80
<VirtualHost IP:80>
ServerName local.bhg.com
RequestHeader set X-Forwarded-Proto https
RewriteRule ^(/.*)?$ http://localhost:9094$1 [P]
ProxyPassReverse / http://localhost:9094/
</VirtualHost>
@shawnsi
shawnsi / aws-ip-ranges.py
Created December 16, 2014 20:43
AWS IP Range Parsing
#!/usr/bin/env python
from __future__ import print_function
import requests
def merge_prefixes(payload):
"""
Converts the AWS services JSON payload into a list of tuples.
Arguments:
@shawnsi
shawnsi / README.md
Last active March 16, 2023 00:08
Remote Wireshark Capture over SSH

Remote Wireshark Capture over SSH

Prerequisites

Client

The client must have wireshark installed and be running Mac OS X or Linux.

Server

@shawnsi
shawnsi / ns2r53.py
Last active December 7, 2015 17:24
Netscaler to Route 53 Conversion
#!/usr/bin/env python
#
# Edit ns.conf appropriately and pass to this script:
# python ns2r53.py <hosted-zone-id> <ns.conf>
from datetime import datetime
import sys
import boto3
import botocore
@shawnsi
shawnsi / README.md
Last active March 27, 2024 11:49
Ansible Vault Environment Variable

Ansible Vault Environment Variable

Per http://docs.ansible.com/ansible/playbooks_vault.html you can set an environment variable to use a password file for vault access. We can use this to create an environment variable to hold the password.

Password Script

Copy vault-env from this project to ~/bin. Then add this to your ~/.bashrc:

export ANSIBLE_VAULT_PASSWORD_FILE=~/bin/vault-env