Skip to content

Instantly share code, notes, and snippets.

View epcim's full-sized avatar

Petr Michalec epcim

View GitHub Profile
epcim / ipxe_with_dhcp.txt
Created April 13, 2023 08:33 — forked from tuxfight3r/ipxe_with_dhcp.txt
ipxe kickstart over http - dhcp and static configuration
View ipxe_with_dhcp.txt
#clone the repo
git clone
cd ipxe/src
cat >ubuntu-amd64-installer.ipxe <<EOF
echo Starting Ubuntu x64 installer for ${hostname}
set base-url
kernel ${base-url}/linux
ross-spencer / latency.txt
Created February 23, 2021 13:06 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
prologic /
Last active November 6, 2023 19:07
Learn Go in ~5mins
View eksctl-config-us-west-2-managed.yaml
kind: ClusterConfig
name: eksctl-us-west-2-managed
region: us-west-2
id: vpc-0b953326cd7a2f917
bakman2 /
Last active October 6, 2023 12:59
Octoprint IP Camera

How to use Octoprint with an IP camera that has an RTSP stream available

Optional: For Wyze cam only

Install Dafang Hacks on the Wyze Cam.

Once running and all is functional, continue. Set video bitrate to 1500, VBR, 30fps.


jerblack / tee.go
Last active May 26, 2023 19:44
Golang: Mirror all writes to stdout and stderr in program to log file
View tee.go
package main
import (
func main() {
vaidd4 /
Last active November 6, 2023 23:29
A cheat sheet for Git Worktrees

Git Worktree Cheatsheet


Setup a folder inside a repo with a specific commit of that repo.

Create a new worktree

git worktree add [-f] [--detach] [--checkout] [--lock] [-b ]  []
tennix /
Last active October 9, 2023 09:57
Convert Grafana dashboard json to jsonnet
#!/usr/bin/env python
import json
from jinja2 import Template
# git clone
# cd tidb-docker-compose
# git clone -b table
# python > pd.jsonnet
# jsonnet -J grafonnet-lib pd.jsonnet > config/dashboards/generated-pd.json
with open('config/dashboards/pd.json', 'r') as f:
data = json.load(f)
View docker-root-ds.yaml
apiVersion: apps/v1
kind: DaemonSet
name: docker-root
name: docker-root
enyachoke / aes.go
Created January 15, 2019 06:51 — forked from tscholl2/aes.go
simple AES encryption/decryption example with PBKDF2 key derivation in Go, Javascript, and Python
View aes.go
package main
import (