Skip to content

Instantly share code, notes, and snippets.

@danpawlik
danpawlik / openwrt-simple.md
Last active June 7, 2023 07:48
OpenWRT simple configuration with roaming 802.11r

OpenWRT wireless configuration with enabled Fast Roaming (802.11r)


                                  +---------------------------------------+                 
+---------------------------------|-----+                                 |                 
|                                 |     |                                 |                 
|                                 |     |                                 |                 
|              MAIN               |     |            AP1                  |                 
|      +--------------------+     |     |      +------------------+       |                 
@ralvares
ralvares / quay all in one
Last active June 14, 2022 08:00
Quay - All in One - Using podman pod
podman login registry.redhat.io
export domain=quay.ralvares.local
export QUAY=/data/quay
mkdir -p $QUAY/postgres-quay
mkdir $QUAY/clair
mkdir -p $QUAY/config/extra_ca_certs
mkdir $QUAY/storage
#!/usr/bin/env bash
NAMESPACE=your_namespace_on_quay
TAG=the_tag
# https://quay.io/organization/your_namespace_on_quay?tab=applications
ACCESS_TOKEN=xxxxx
for repository in $(curl -s -X GET -H "Authorization: Bearer $ACCESS_TOKEN" "https://quay.io/api/v1/repository?namespace=$NAMESPACE" | jq -r '.repositories[].name' | sort); do
curl -s -X DELETE -H "Authorization: Bearer $ACCESS_TOKEN" https://quay.io/api/v1/repository/$NAMESPACE/$repository/tag/$TAG
#!/bin/bash
if [ $UID != "0" ]; then
echo "ERROR: You must run this script as root!"
exit 1
fi
dnf install \
@development-tools \
android-tools \
automake \
@jboner
jboner / latency.txt
Last active May 24, 2024 16:18
Latency Numbers Every Programmer Should Know
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