Skip to content

Instantly share code, notes, and snippets.

View admpub's full-sized avatar
🎯
Focusing

Hank Shen admpub

🎯
Focusing
View GitHub Profile
@mojzu
mojzu / README.md
Created January 5, 2022 20:20
MTLS with Caddy and step-ca

Example docker compose file

version: "3"
services:
  caddy:
    build:
      context: .
      dockerfile: service/caddy/dockerfile
    image: mojzu/dev-caddy:latest
@eusonlito
eusonlito / README.md
Last active January 1, 2024 11:36
Strong iptables and ipset protection

Protect your server with a strong iptables rules and ipset lists.

1. Install ipset to manage ipstables lists

apt install ipset

2. Install iptables-persistent to preserve iptables rules on reboot

@dim
dim / atomutex_test.go
Created February 28, 2017 16:49
Benchmark: sync.RWMutex vs atomic.Value
/*
Benchmark_RWMutex-4 100000000 18.1 ns/op
Benchmark_Atomic-4 200000000 8.01 ns/op
Benchmark_RWMutex_parallel-4 30000000 46.7 ns/op
Benchmark_Atomic_parallel-4 1000000000 2.61 ns/op
*/
package main