Skip to content

Instantly share code, notes, and snippets.

@AnatomicJC
AnatomicJC / get-ssl-certificates-details.md
Created September 13, 2019 08:34
Get SSL certificate details with curl
echo | openssl s_client -showcerts -servername doamin.ltd -connect domain.ltd:443 2>/dev/null | openssl x509 -inform pem -noout -text
@AnatomicJC
AnatomicJC / letsencrypt-cerbot-wildcard.md
Last active September 12, 2019 19:02
Let's Encrypt wildcard docker OVH

Go to https://api.ovh.com/console/ and create a new API key with these rights (replace domain.ltd with your domain managed at OVH):

GET /domain/zone/
GET /domain/zone/domain.ltd/status
GET /domain/zone/domain.ltd/record
GET /domain/zone/domain.ltd/record/*
POST /domain/zone/domain.ltd/record
POST /domain/zone/domain.ltd/refresh
DELETE /domain/zone/domain.ltd/record/*
@AnatomicJC
AnatomicJC / ksmtuned.txt
Created September 11, 2019 12:51
Check is ksmtuned is efficient
$ grep -H '' /sys/kernel/mm/ksm/pages_*
/sys/kernel/mm/ksm/pages_shared:69
/sys/kernel/mm/ksm/pages_sharing:1085
/sys/kernel/mm/ksm/pages_to_scan:100
/sys/kernel/mm/ksm/pages_unshared:81
/sys/kernel/mm/ksm/pages_volatile:158263
@AnatomicJC
AnatomicJC / zfs-docker.md
Last active December 14, 2023 00:33
ZFS and Docker

Create a dedicated ZFS docker pool with deduplication disabled in case of dedup enabled on your system:

zfs create -o mountpoint=/var/lib/docker -o dedup=off rpool/docker

Sometimes, you don't want ZFS for docker storage. ZFS can be sadly quite painful with Docker in Docker and similar scenarios. It might be best to avoid the problem by creating a volume in your ZFS pool, formatting that volume to ext4, and having docker use "overlay2" on top of that, instead of "zfs".

zfs create -s -V 30G rpool/docker

mkfs.ext4 /dev/zvol/rpool/docker