Skip to content

Instantly share code, notes, and snippets.

eldondev / traefik.toml
Created Jan 12, 2017
A Treafik configuration file with let's encrypt, https redirection, and hot reloading.
View traefik.toml
graceTimeOut = 10
traefikLogsFile = "log/traefik.log"
accessLogsFile = "log/access.log"
logLevel = "INFO"
defaultEntryPoints = ["http", "https"]
onDemand = true
OnHostRule = true
address = ":80"

What is this all about

What has been going on?

  • Chips have been getting faster
    • Kind of topped out due to physics, but science advances all the time.
  • Instead, chips have been getting bigger
    • Adding Cores only makes properly architected systems faster, so what to do with all of those extra cores?


  • Makes programmers happy, because we can just say "restart the vm" rather than try to debug that old, poorly written program
eldondev / Dockerfile
Last active Nov 15, 2019
zxing dockerfile
View Dockerfile
FROM java
RUN wget
RUN wget
RUN wget
ENTRYPOINT ["java","-cp", "core-3.2.2-20151101.162918-3.jar:javase-3.2.2-20151101.162926-3.jar:jcommander-1.48.jar", ""]
eldondev /
Created Oct 25, 2015
Some basic code to parse some blocks
import struct, sys, io
from hashlib import sha256
from binascii import b2a_hex
blkfile = open("blk00000.dat", 'rb')
block_hashes = [b'\x00' * 32]
trans_hashes = [b'\x00' * 32]
def get_var(reader):
firstbyte =
if ord(firstbyte) <= 0xfc:
eldondev / cmd
Last active Feb 26, 2021
Because everyone needs a good preseed
View cmd
wget -nc
wget -nc
cp -nv ~/.ssh/ .
qemu-system-x86_64 -machine accel=kvm -kernel linux -initrd initrd.gz -m 1G -smp 2 -append "blacklist=vga16fb fb=false video=false vga=normal auto=true url= hostname=otto domain=" -net user,guestfwd=:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none
eldondev / ubuntu boot args
Created Sep 24, 2015
Ubuntu boot args to prevent modeset
View ubuntu boot args
blacklist=vga16fb fb=false video=false vga=normal
eldondev / do.go
Last active Aug 29, 2015
Write nginx configs from combined cert/pem files
View do.go
package main
import (
eldondev / gist:2888b96e2f2d3f7b5101
Last active Aug 29, 2015
A little gist that will comment out all but a single wpa config in a wpa_supplicant.conf (pass part of the SSID as an arg to the script)
View gist:2888b96e2f2d3f7b5101
#!/usr/bin/env python
lines = open('/etc/wpa_supplicant/wpa_supplicant.conf').readlines()
groups = [[]]
for line in lines:
if line[0] != '#':
line = '#' + line
groups[-1] += [ line ]
if '}' in line:
groups += [[]]
groups += [[]]
eldondev /
Created Apr 10, 2015
ssh key shenanigans
ADDRESS=`echo $SERVICE_ADDR|cut -f 1 -d\:`
ssh-keygen -t rsa -N "" -f $TMP_KEY
. <(ssh-agent )
ssh-add $TMP_KEY
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=false -o IdentitiesOnly=true -o IdentityFile=$TMP_KEY root@$ADDRESS date