View traefik.toml
graceTimeOut = 10
traefikLogsFile = "log/traefik.log"
accessLogsFile = "log/access.log"
logLevel = "INFO"
defaultEntryPoints = ["http", "https"]
onDemand = true
OnHostRule = true
[entryPoints]
[entryPoints.http]
address = ":80"
View WhyAllwinner.md

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?

Virtualization

  • Makes programmers happy, because we can just say "restart the vm" rather than try to debug that old, poorly written program
View Dockerfile
FROM java
RUN wget https://oss.sonatype.org/content/repositories/snapshots/com/google/zxing/javase/3.2.2-SNAPSHOT/javase-3.2.2-20151101.162926-3.jar
RUN wget https://oss.sonatype.org/content/repositories/snapshots/com/google/zxing/core/3.2.2-SNAPSHOT/core-3.2.2-20151101.162918-3.jar
RUN wget https://repo1.maven.org/maven2/com/beust/jcommander/1.48/jcommander-1.48.jar
ENTRYPOINT ["java","-cp", "core-3.2.2-20151101.162918-3.jar:javase-3.2.2-20151101.162926-3.jar:jcommander-1.48.jar", "com.google.zxing.client.j2se.CommandLineRunner"]
View blkparse.py
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 = reader.read(1)
if ord(firstbyte) <= 0xfc:
View cmd
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
cp -nv ~/.ssh/id_rsa.pub .
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=http://10.0.2.10:8080/debian-preseed.txt hostname=otto domain=" -net user,guestfwd=:10.0.2.10:8080-cmd:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none
View ubuntu boot args
blacklist=vga16fb fb=false video=false vga=normal
View do.go
package main
import (
"crypto/md5"
"crypto/x509"
"encoding/pem"
"fmt"
"io/ioutil"
"log"
"os"
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 += [[]]
View check.sh
#!/bin/bash
ADDRESS=`echo $SERVICE_ADDR|cut -f 1 -d\:`
TMP_KEY=/tmp/`uuidgen`
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