Skip to content

Instantly share code, notes, and snippets.

@delfuego
delfuego / docker-block-enforcement.sh
Last active March 5, 2017 03:05 — forked from clems4ever/custom-chain-enforcement.service
docker-swarm iptables FORWARD custom chain enforcement
#!/bin/bash
CUSTOM_CHAIN=DOCKER-BLOCK
DELAY=10
NEW_RULE="-o docker0 -j ${CUSTOM_CHAIN}"
chain_exists()
{
[ $# -lt 1 -o $# -gt 2 ] && {
echo "Usage: chain_exists <chain_name> [table]" >&2
@delfuego
delfuego / docker.log
Created November 6, 2015 16:19
Docker 1.9.0 log file from period where container wouldn't start (Docker issue ##17760)
INFO[1520987] Processing signal 'terminated'
INFO[1520997] Container 6b219f27a365b3eece546db2423f458213b2b1daf7418eece911916179f3bf58 failed to exit within 10 seconds of SIGTERM - using the force
INFO[0000] [graphdriver] using prior storage driver "aufs"
INFO[0001] API listen on [::]:2376
INFO[0001] API listen on /var/run/docker.sock
INFO[0000] API listen on [::]:2376
INFO[0000] API listen on /var/run/docker.sock
INFO[0000] [graphdriver] using prior storage driver "aufs"
WARN[0003] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found.
insmod /lib/modules/3.13.0-67-generic/kernel/net/llc/llc.ko
sudo apt-get -y install build-essential devscripts quilt nano
sudo apt-get -y build-dep openssl
apt-get source openssl
cd openssl-*
nano debian/rules # Remove no-ssl2 in args
dch -n 'Allow dangerous v2 protocol'
dpkg-source –commit
debuild -uc -us
sudo dpkg -i ../*ssl*.deb
@delfuego
delfuego / keybase.md
Created April 5, 2015 01:42
keybase.md

Keybase proof

I hereby claim:

  • I am delfuego on github.
  • I am jlevine (https://keybase.io/jlevine) on keybase.
  • I have a public key whose fingerprint is 3427 3F20 A3C4 E6BC 9C64 1546 1EC5 E6F2 F595 706D

To claim this, I am signing this object:

@delfuego
delfuego / login_controller.js
Created March 28, 2014 02:02
HHS fork [HEAD] with sprint11 [upstream/sprint11] merged in
define([
'jquery',
'underscore',
'backbone',
'bootstrap',
'utilities',
'base_controller',
'login_view',
<<<<<<< HEAD
'login_config',
@delfuego
delfuego / gist:2840417
Created May 31, 2012 02:11
Verizon iPhone 4S GPS/Location Services issue

Test specifications:

  • both phones running RunKeeper 2.5.2.12 (pre-release testing version)
  • both phones started activity with location services on (obviously), wifi on, and cellular data on
  • halfway through run, turned off wifi on VZW iPhone 4S (based on the oft-mentioned possibility that having wifi on interferes with accurate GPS resolution)

Results

#!/bin/bash -ex
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
# install ThinkUp on EC2 Ubuntu instance:
#
# @spara 12/23/10
# @waxpancake 1/3/11
# install required packages
sudo apt-get update