Skip to content

Instantly share code, notes, and snippets.


David J. Felix DavidJFelix

View GitHub Profile
DavidJFelix /
Last active January 15, 2021 14:01
Debug Scratch Docker Containers

Containers are great for shipping software, but sometimes you can go too far when stripping down your container to make it as small as possible. There’s a fine balance between a “no-frills” image and something impossible to debug (I’m looking at you, single binary go containers). The normal way I see people debug a running container is to docker exec -it $CONTAINER sh and install their debug tools on demand in the container. But what if your container doesn’t have /bin/sh? What if it doesn’t have a package manager? You could copy utilities into the container with docker cp and then exec into the running container but that’s also a hassle. So instead of trying to debug from within the container, a friend recently asked how you could debug from a different container. I’m not that smart so I asked much smarter people online and got a good answer back. Thanks again Justin Cormack for the reply. Let’s create a stripped down container with only caddy. First download/extract the caddy binary `$: curl https://getcad

DavidJFelix / VPC Cloudformation.yml
Created February 11, 2020 19:53
How I setup my VPC
View VPC Cloudformation.yml
AWSTemplateFormatVersion: '2010-09-09'
License: Apache-2.0
Description: FIXME Remove. The CIDR blocks to use for the subnets in the services VPC.
Default: ',,,,,'
Type: CommaDelimitedList
DavidJFelix /
Created February 13, 2018 16:13

Keybase proof

I hereby claim:

  • I am davidjfelix on github.
  • I am davidjfelix ( on keybase.
  • I have a public key ASBXhkpcdJ6o4vmyZRI1p7PDZK1XXL82RZB2iks6U7RNqQo

To claim this, I am signing this object:

DavidJFelix /
Created July 31, 2017 13:47
OSX setup notes
set -euvxo pipefail
# Get commande line tools
xcode-select --install
# Get homebrew
/usr/bin/ruby -e "$(curl -fsSL"
DavidJFelix / java.pp
Last active August 29, 2015 14:17 — forked from hameno/java.pp
View java.pp
class java {
class { 'apt': }
# Add PPA
apt::ppa { 'ppa:webupd8team/java': } ->
# Install Java
package { 'oracle-java7-installer':
ensure => latest,
require => [
DavidJFelix /
Last active December 23, 2020 11:28
A lab for HyperLogLogs using Redis & Python, created with Ipython notebook

Redis is an in-memory network key/value store and nltk is the python natural language toolkit. We'll be using these libraries later for the lab.

    import redis
    import nltk

Setup our redis connection. It's on the VM, so local is fine.

DavidJFelix /
Created July 26, 2014 18:32
Modify python behavior
from ctypes import c_int8
from struct import calcsize
# Make 4 = 5
c_int8.from_address(id(4) + calcsize('PP')).value = 5
# A little more readable
address = id(4)
offset = calcsize('PP')