View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine AS builder | |
RUN apk update && \ | |
apk add --no-cache git ca-certificates && \ | |
update-ca-certificates | |
ENV CGO_ENABLED=0 | |
ENV GOOS=linux | |
ENV GOARCH=arm |
View dump.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"flag" | |
"io" | |
"log" | |
"net/http" | |
"strconv" | |
) |
View kube-flannel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: flannel | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods |
View decap-ipip.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from scapy.all import * | |
def decap_and_send(packet): | |
if packet[IP][0].proto == 4: | |
decap = (Ether() / packet[IP][1]) | |
sendp(decap, iface='dummy0') | |
print(decap) |
View oneliner.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import base64 | |
>>> import dnslib | |
>>> | |
>>> dnsmsg = 'f2+AgAABAAEAAAAAA3d3dwRyaXBlA25ldAAAAQABwAwAAQABAAA3+gAEwQAGiw==' | |
>>> dnslib.DNSRecord.parse(base64.b64decode(dnsmsg)) | |
<DNS Header: id=0x7f6f type=RESPONSE opcode=QUERY flags=RA rcode='NOERROR' q=1 a=1 ns=0 ar=0> | |
<DNS Question: 'www.ripe.net.' qtype=A qclass=IN> | |
<DNS RR: 'www.ripe.net.' rtype=A rclass=IN ttl=14330 rdata='193.0.6.139'> |
View gist:135acd05622c8ea9c92af0db02e85893
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LX8ogUgQVusVXr6fUruK5VPUoTwXHxbHxz |
View 10-thinkpad.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "Keyboard-ThinkPad" | |
Driver "libinput" | |
#MatchProduct "ThinkPad Compact Bluetooth Keyboard with TrackPoint" | |
#MatchIsKeyboard "on" | |
#Option "SendCoreEvents" "true" | |
Option "XkbLayout" "dvorak,us" | |
Option "XkbVariant" "dvorak" | |
Option "XkbOptions" "ctrl:swapcaps,grp:alt_shift_toggle,grp_led:scroll" | |
EndSection |
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM java:8 | |
# SPARK | |
ARG SPARK_ARCHIVE=http://ftp.jaist.ac.jp/pub/apache/spark/spark-2.1.0/spark-2.1.0-bin-hadoop2.7.tgz | |
ENV SPARK_HOME /usr/local/spark-2.1.0-bin-hadoop2.7 | |
ENV PATH $PATH:${SPARK_HOME}/bin | |
RUN curl -s ${SPARK_ARCHIVE} | tar -xz -C /usr/local/ | |
WORKDIR $SPARK_HOME |
View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"strconv" |
View gist:40cb58e0c5542be503387625e4cfeb2d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go test -race | |
2016/10/05 14:58:28 S3 Bucket Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:28.563142289Z","TTL":2000000000},"Name":"bucket_test_add","Location":"eu-west-1"} | |
2016/10/05 14:58:28 S3 Bucket Cache Hit - {"CacheItem":{"Timestamp":"2016-10-05T14:58:28.563142289Z","TTL":2000000000},"Name":"bucket_test_add","Location":"eu-west-1"} | |
2016/10/05 14:58:28 S3 Bucket Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:28.56391918Z","TTL":2000000000},"Name":"bucket_test_expire","Location":"eu-west-1"} | |
2016/10/05 14:58:31 S3 Bucket Cache Miss - {"Name":"bucket_test_expire"} | |
2016/10/05 14:58:31 S3 Object Cache Miss - {"Key":"object_test_add"} | |
================== | |
--- FAIL: TestCacheObjectGet (0.00s) | |
WARNING: DATA RACE | |
Write at 0x00c4200814d0 by goroutine 10: |
NewerOlder