Skip to content

Instantly share code, notes, and snippets.

@ekristen
ekristen / Dockerfile
Created December 8, 2013 17:17
Testing overwriting resolv.conf
FROM ubuntu:12.04
ADD resolv.conf /etc/resolv.conf
ENTRYPOINT ["/bin/bash"]
@ekristen
ekristen / gist:8696240
Created January 29, 2014 20:25
useful docker cleanup commands
docker ps -a | grep "Exit" | awk '{print $1}' | xargs -I{} docker stop {}
docker ps -a | grep "Exit" | awk '{print $1}' | xargs -I{} docker kill {}
docker ps -a | grep "Exit" | awk '{print $1}' | xargs -I{} docker rm {}
docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi
@ekristen
ekristen / keybase.md
Created March 7, 2014 19:42
keybase.md

Keybase proof

I hereby claim:

  • I am ekristen on github.
  • I am kristensen (https://keybase.io/kristensen) on keybase.
  • I have a public key whose fingerprint is 77A3 132C C077 CED7 21CA ECBF E1D9 3132 A1EB D5CC

To claim this, I am signing this object:

encryption:
password: some_random_long_string
dev_name: /dev/sda1
vg_name: data
mountpoint: data
@ekristen
ekristen / example.js
Last active December 1, 2018 08:12
Example Integration of Restify Endpoints
var restify = require('restify');
var restify_endpoints = require('restify-endpoints');
var endpoints = new restify_endpoints.EndpointManager({
endpointpath: __dirname + '/endpoints'
});
// Create the RESTful Server
var server = restify.createServer();
@ekristen
ekristen / check_docker_container.sh
Last active January 16, 2024 16:15
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@ekristen
ekristen / instanceluks.pillar
Last active August 29, 2015 14:02
Example State and Pillar Data for Automatic Encryption of EC2 Instance (Ephemeral) Storage for SaltStack
instanceluks:
password: global_password
passwords:
data0: password1
data1: password2
data2: password3
#!/bin/bash
#
# esdiagdump
#
# Usage: esdiagdump [-h <hostname/IP>:<port>] [-o <output filename>]
# hostname defaults to localhost
# output file defaults to current directory/esdiagdump.out.<timestamp>
#
# TODO:
# - Support for collecting marvel indices for export
sudo pip install pygit2==0.20.3
Downloading/unpacking pygit2==0.20.3
Downloading pygit2-0.20.3.tar.gz (146kB): 146kB downloaded
Running setup.py (path:/tmp/pip_build_root/pygit2/setup.py) egg_info for package pygit2
Installing collected packages: pygit2
Running setup.py install for pygit2
building '_pygit2' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -Iinclude -I/usr/include/python2.7 -c src/tree.c -o build/temp.linux-x86_64-2.7/src/tree.o
In file included from src/utils.h:34:0,
@ekristen
ekristen / blackbox.patch
Last active August 29, 2015 14:15
Patch to make blackbox installable via homebrew
diff --git a/bin/blackbox_addadmin b/bin/blackbox_addadmin
index 782d815..a26472f 100755
--- a/bin/blackbox_addadmin
+++ b/bin/blackbox_addadmin
@@ -9,7 +9,7 @@
#
set -e
-blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+blackbox_home=$(brew --prefix)/Cellar/blackbox/1.20150203/include