Skip to content

Instantly share code, notes, and snippets.

@AnatomicJC
AnatomicJC / zfs-docker.md
Last active May 20, 2022
ZFS and Docker
View zfs-docker.md

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

@AnatomicJC
AnatomicJC / ksmtuned.txt
Created Sep 11, 2019
Check is ksmtuned is efficient
View ksmtuned.txt
$ 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 / letsencrypt-cerbot-wildcard.md
Last active Sep 12, 2019
Let's Encrypt wildcard docker OVH
View letsencrypt-cerbot-wildcard.md

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 / get-ssl-certificates-details.md
Created Sep 13, 2019
Get SSL certificate details with curl
View get-ssl-certificates-details.md
echo | openssl s_client -showcerts -servername doamin.ltd -connect domain.ltd:443 2>/dev/null | openssl x509 -inform pem -noout -text
View zfs-arc-memory.md
$ cat /proc/spl/kstat/zfs/arcstats |grep c_
c_min                           4    536870912
c_max                           4    2147483648
cat /etc/modprobe.d/zfs.conf
# https://www.google.com/search?q=bit+calculator Bit > GigaBit
# Min 512MB / Max 2048 MB Limit
View debug-gluster.md
gluster volume set nextcloud-data performance.cache-size 1GB
gluster volume set nextcloud-data performance.client-io-threads on
gluster volume set nextcloud-data performance.io-cache on
gluster volume set nextcloud-data performance.io-thread-count 16
gluster volume set nextcloud-data performance.readdir-ahead enable
gluster volume set nextcloud-data performance.read-ahead disable
gluster volume set nextcloud-data features.cache-invalidation on
gluster volume set nextcloud-data features.cache-invalidation-timeout 600
gluster volume set nextcloud-data performance.stat-prefetch on
@AnatomicJC
AnatomicJC / debian_ksm.md
Created Sep 23, 2019 — forked from mapuo/debian_ksm.md
Enable KSM (Kernel Same-Page Merging) on boot in Debian
View debian_ksm.md

Enable KSM (Kernel Same-Page Merging) on boot in Debian

I have installed and running Netdata on my Debian based home server and I wanted to enable KSM after Netdata installer suggested it cloud save some RAM.

To enable the KSM on boot in Debian you I executed these steps:

  1. Install ksmtuned without all the QEMU dependencies:
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active Jun 28, 2022
Backup android app, data included, no root needed, with adb
View android-backup-apk-and-datas.md

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

@AnatomicJC
AnatomicJC / tmux-notes.md
Last active Sep 24, 2020
tmux powerline / mouse / cheat sheet
View tmux-notes.md

Powerline

# apt install powerline
$ cat ~/.tmux.conf 
source "/usr/share/powerline/bindings/tmux/powerline.conf"
set -g default-terminal "screen-256color"