Repo Bloat: Finding Large Objects

I’ve written previously about trimming the fat on bloated Git repositories. Here I’ll present a convenient method for listing the largest objects in a human-friendly format. The first step in finding the largest objects is to list all objects. We can do this with verify-pack: $ git verify-pack -v .git/objects/pack/pack-{HASH}.idx 8306276cde4f3cff8cbe5598fd98bf10146da262 commit 254 170 9725 4677b7c11924cefa62393f0e3e7db6c06787815e tree 30 63 9895 1 08ce30d6550bed7725c399026d91fce24c86a79f 5062bde76952965ff5c473a7de0ae102b4d2c9f3 tree 1122 944 9958 1c1ef555c77ee527c95ca093f251313a6418c158 blob 10 19 10902 non delta: 15175 objects chain length = 1: 1672 objects chain length = 31: 10 objects chain length = 32: 4 objects ....

2015-11-17 · 3 min · 615 words · Nathaniel Hoag

Wrapping OpenSSL for Simplified Usage

I routinely inspect live SSL certificates to validate domain coverage. While working directly with openssl is not necessarily painful, I wanted a tool that could be used to return a simple list of domains without the extra output and without the terminal hang. Below is an example of retrieving the SSL cert for google.com with openssl s_client: $ openssl s_client -showcerts -connect google.com:443 CONNECTED(00000003) depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA verify error:num=20:unable to get local issuer certificate verify return:0 --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*....

2015-10-25 · 5 min · 854 words · Nathaniel Hoag

Getting Complex With Remote Bash

Over the past few months, I’ve found and created a bunch of fun new scripting tricks and tools. Below are two somewhat related items that helped to unlock new possibilities for me in remote bash automation. The first is a Perl one-liner that allows filtering access logs by start and end times. The second is a method for executing complex commands remotely via ssh without all those intricate escapes. As context for the Perl log filter, my team at work regularly performs Load Test Analyses....

2015-10-25 · 4 min · 771 words · Nathaniel Hoag

Many and Varied Ramblings From the First Half of 2015

The last six months have been very full with the arrival of our first baby and all the prep work and new responsibilities that go with being a new parent. Here and there I’ve managed to squeeze in little hobby projects. Much to my astonishment, I also won the !!Con attendance lottery(!!), and had an amazing few days in NYC. !!Con !!Con was an extremely fun conference, and I consider myself so lucky to have won the attendance lottery....

2015-06-29 · 4 min · 802 words · Nathaniel Hoag

Hubot With a Redis Brain on Docker

I’ve written previously about deploying Hubot on Docker, deploying patched Hubot scripts, and bechmarking mass inserts with a Redis Docker container. In this post, I’ll cover how to link a Hubot Docker container to a Redis Docker container to equip Hubot with persistent memory. As an overview we’re going to: Spin up a Redis Docker container with a host directory mounted as a data volume Spin up a linked Hubot Docker container that will use Redis as a persistent brain For my most recent post on Redis mass inserts, I created a basic Redis Docker image that satisfies all of the requirements to be used as a Hubot Redis brain....

2015-01-10 · 3 min · 604 words · Nathaniel Hoag