Snippets

Sysadmin Snippets

strace all PHP-FPM processes

strace -f $(pidof php-fpm | sed 's/\([0-9]*\)/\-p \1/g')

Process memory in MB + process path

ps aux  | awk '{print $6/1024 " MB\t\t" $11}'  | sort -n

Server Config Snippets

nginx Security Headers

# Security Headers
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;