Skip to content

Instantly share code, notes, and snippets.

View ashb's full-sized avatar

Ash Berlin-Taylor ashb

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ashb on github.
  • I am ashb (https://keybase.io/ashb) on keybase.
  • I have a public key whose fingerprint is 540D 3F73 35A0 D879 CBF5 5D6C 2469 6389 2989 21E7

To claim this, I am signing this object:

@ashb
ashb / tmux.conf
Created July 22, 2015 15:16
My tmux.conf
set -g default-terminal "screen-256color"
# reattach-to-user-namespace is so that `pbpaste` and `pbcopy` work after reattaching. Mostly. `brew install reattach-to-user-namespace`
set -g default-command "reattach-to-user-namespace -l bash"
# Start numbering windows from 0, not 1
set -g base-index 0
# Renumber windows when we close one.
set -g renumber-windows on
# Lots more scroll back. ^b [ to enter scroll back mode, ^c to leave it
set -g history-limit 9999
@ashb
ashb / policy.json
Last active August 29, 2015 14:26
Complex policy much?
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowEC2ProductionReadOnly",
"Resource": "*",
"Effect": "Allow",
"Action": [
"ec2:Describe*",
"ec2:List*"
@ashb
ashb / run-chef.sh
Created October 30, 2011 14:48
Make the chef-client (v0.10+) daemon process wake and run, and print what its doing to stdout
#!/bin/bash
#
# Author:: Ash Berlin (ash_github@firemirror.om)
# Copyright:: Copyright (c) 2011 DigiResults Ltd.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@ashb
ashb / jv_test.go
Last active November 18, 2015 22:35
Trying out ginkgo -- what do other's think of the syntax?
package jq_test
import (
"github.com/ashb/jq-repl/jq"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
)
ITERATION = 04ash
dovecot:
apt-get install libssl-dev libmysqlclient-dev
./configure --with-mysql --with-ssl=openssl --with-sql=plugin --with-ioloop=best --disable-rpath --disable-static --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info/ --with-moduledir=/usr/lib/dovecot/modules
make install DESTDIR=/tmp/installdir
fpm -s dir -t deb -n dovecot -v 2.0.14 --iteration $ITERATION -C /tmp/installdir/ -p dovecot-VERSION_ARCH.deb -d "libmysqlclient16" -d "libc6 (>= 2.11.1)" -d "libssl0.9.8" -x dovecot-config etc usr/bin usr/sbin usr/lib usr/share/doc usr/share/man
fpm -s dir -t deb -n dovecot-dev -v 2.0.14 --iteration $ITERATION -C /tmp/installdir/ -d "dovecot (>= 2.0.14-01ash)" usr/lib/dovecot/dovecot-config usr/include usr/share/aclocal
dovecot-pigeonhole:
@ashb
ashb / gist:cce8edd491de4de9b36017e50cd0c542
Last active April 13, 2016 11:19 — forked from gtmtech/gist:9af0453db143c8a18e4fbd4460e00a91
Realtime dumping of HTTP traffic headers
#!/usr/bin/perl
my $port = shift or "80";
open (FH, "tshark -d tcp.port==$port,http -V -Y 'http.request || http.response' port $port |") or die "Could not run tshark";
%requests=();
while (<FH>) {
if (/^[^\s]/) {
# Headers
@ashb
ashb / Dockerfile
Last active November 2, 2016 16:39
FROM alpine
RUN ls /etc/profile.d /usr/local/bin /usr
COPY resources/etc/ /etc
COPY resources/usr/ /usr
RUN ls /etc/profile.d/ /usr/local/bin /usr
@ashb
ashb / unused-amis.sh
Last active January 12, 2017 01:23
Find un-used AMIs
#!/bin/bash -e
set -o pipefail
# File 1 is the list of our AMIs
# File 2 is the list of AMIs used by our instances
# Column 1 is an image of ours that is not in use
# Column 2 is an AMI that is in use that isn't one of ours
# Column 3 is the list of our AMIs that are in use.
comm -23 \
@ashb
ashb / lock.py
Last active May 8, 2017 10:26
Lock using Amazon SimpleDB - not needed since terraform 0.9
#!/usr/bin/env python
from __future__ import print_function
import argparse
import boto
import boto.provider
import boto.sdb
import getpass
import os
import signal
import subprocess