Skip to content

Instantly share code, notes, and snippets.

View supermarsx's full-sized avatar

supermarsx

  • Portugal
  • 07:38 (UTC)
View GitHub Profile
@supermarsx
supermarsx / healthchecks.yml
Last active December 17, 2024 23:40
Docker compose healthchecks for containers
# mariadb
healthcheck:
test: healthcheck.sh --connect --innodb_initialized
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
#ENV: MARIADB_ROOT_PASSWORD: password...
# mariadb alternative
@supermarsx
supermarsx / sysctl.conf
Created December 17, 2024 17:43
Docker sysctl.conf master file
net.ipv4.tcp_syncookies = 1
#net.ipv4.tcp_max_syn_backlog = 2048
#net.ipv4.tcp_synack_retries = 3
net.ipv4.ip_forward = 1
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_tw_recycle = 0
#net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_window_scaling = 0
net.core.somaxconn = 4096
@supermarsx
supermarsx / nmcli-rm-docker-bridges.sh
Created December 16, 2024 16:11
Remove all docker bridges with nmcli
nmcli connection show | awk '/^br-/ {print $1}' | xargs -I {} nmcli connection delete {}
@supermarsx
supermarsx / wifiqrcode.txt
Created November 13, 2024 13:28
Wi-Fi QR code generation string
WIFI:S:networkname;T:WPA;P:password;;
@supermarsx
supermarsx / fix0x8004011c.cmd
Created October 22, 2024 17:12
Fix 0x8004011c Outlook with IMAP
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb" /v ProtectionPolicy /t REG_DWORD /d 1 /f
@supermarsx
supermarsx / AddDcoAdapter.cmd
Created August 15, 2024 16:29
Add OpenVPN DCO Adapter
cd "C:\Program Files\OpenVPN\bin\"
.\tapctl.exe create --hwid ovpn-dco
@supermarsx
supermarsx / header_checks
Created August 15, 2024 13:41
Postfix Scrub received headers, header_checks
/^Received:.*/ IGNORE
/^x-originating-ip:.*/ IGNORE
@supermarsx
supermarsx / dkimdnsrecordfilter.sh
Created August 15, 2024 13:18
DKIM Key DNS Record Filter
tr -d ' ' < domain.com/selector.txt | tr -d '\n' | tr -d '"' | tr -d '\t' | tr -s "[:blank]" | sed -n 's/.*(\(.*\)).*/\1/p' && echo
@supermarsx
supermarsx / freeusedspace.sh
Created May 24, 2024 10:57
Cheat sheet, free/used space linux by folder/mount points
# free space mount points
df -h /
# used space folders
du -sh *
# used space process locked files
lsof +L1
# used space by files in folder
ls -lah
@supermarsx
supermarsx / EditTextCommand.reg
Created April 28, 2024 22:23
Regedit Edit shell command
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ODCfile\shell\EditText\command]
@="\"C:\\Program Files (x86)\\Microsoft Office\\root\\client\\appvlp.exe\" NOTEPAD.EXE \"%1\""