Skip to content

Instantly share code, notes, and snippets.

View nckturner's full-sized avatar

Nicholas Turner nckturner

  • Amazon Web Services
  • Seattle
View GitHub Profile
@nckturner
nckturner / approvers-reviewers.txt
Last active May 3, 2022 06:59
Unique Approver Reviewer Count for Sig Report 2022
aws-iam-authenticator:
approvers:
- nckturner
- micahhausler
- wongma7
- jaypipes
- jyotimahapatra
reviewers:
- nckturner
- micahhausler
@nckturner
nckturner / pv.yaml
Last active May 20, 2021 08:02
ebs persistent volume
---
apiVersion: v1
kind: Pod
metadata:
name: app
spec:
containers:
- name: app
image: centos
command: ["/bin/sh"]
@nckturner
nckturner / get-edid.py
Created November 1, 2020 20:55 — forked from mvollrath/get-edid.py
Using xrandr CLI to write EDID from a connected monitor to stdout
#!/usr/bin/env python
import re
import subprocess
def get_edid_for_output(connector: str) -> bytes:
xrandr = subprocess.run(
['xrandr', '--props'],
check=True,
@nckturner
nckturner / run-cluster.sh
Created February 22, 2020 21:50
Run local-up-cluster with AWS cloud provider
#!/bin/bash
PRIVATE_DNS="$(curl http://169.254.169.254/latest/meta-data/local-hostname)"
HOSTNAME_OVERRIDE="${PRIVATE_DNS}" \
CLOUD_PROVIDER=aws \
ALLOW_PRIVILEGED=true \
LOG_LEVEL=4 \
"$HOME/go/src/k8s.io/kubernetes/hack/local-up-cluster.sh"
# .zshrc
# Load all files from .config/zshrc.d directory
if [ -d $HOME/.config/zshrc.d ]; then
for file in $HOME/.config/zshrc.d/*.zsh; do
source $file
done
fi
# Load all files from .config/rc.d directory
@nckturner
nckturner / debian-init.sh
Created November 29, 2016 01:09 — forked from andsens/debian-init.sh
This is a generic init-script, easily modifiable to suit your needs. It uses quite a lot of lsb init-functions and adheres to the lsb standards.
#!/bin/sh
### BEGIN INIT INFO
# Provides: generic-prog
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Generic Program
# Description: Generic Program is a generic program to do generic things with
### END INIT INFO
@nckturner
nckturner / latency.markdown
Created January 5, 2016 21:08 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs