Use Nginx and mod_pagespeed to Convert Images to WebP on the Fly Compile ngx_pagespeed First make sure Nginx is built with --with-compat, so we do not need to rebuild Nginx from scratch. incubator: …
Links
All posts
Is there a regular expression to detect a valid regular expression? This is a recursive regex, and is not supported by many regex engines. PCRE based ones should support it. / ^ # start of string ( # first …
Force file download with Nginx add_header Content-Disposition 'attachment;'; server { listen 80; server_name my.domain.com; location ~ ^.*/(?P<request_basename>[^/]+\.(mp3))$ { root /path/to/mp3/ add_header …
Shell Script Study Notes Arithmetic operations val=`expr $a + $b` Operators Symbol Description Example ! NOT [ ! false ] -o OR [ $a -lt 20 -o $b -gt 20 ] -a AND [ $a -lt 20 -a $b -gt 20 ] = equality check [ $a …
Excessive Errors from sentry.lang.javascript.processor: SoftTimeLimitExceeded() Counters-0 queue is rising continuously Excessive Errors from sentry.lang.javascript.processor: SoftTimeLimitExceeded() …
Part 1: Build a Telegram Bot Step by Step Part 2: Add NLP to the Chatbot Part 3: Add New Skills to the Chatbot Python Telegram Bot Tutorial Write a Simple Telegram Bot with Python Code snippets
Fixing Disk Space Not Freed on Linux Use df -ah and du -h --max-depth=1 The total from du is far smaller than the total reported by df. When a process deletes files but keeps running, the files are not …
Sentry Source Code Development Notes Formatting uWSGI requests logs PostgreSQL: Documentation: 9.3: The Password File
OpenResty + Redis: Block High-Frequency IPs init_by_lua_block { redis = require "redis" client = redis.connect('127.0.0.1', 6379) } server { listen 8080; location / { access_by_lua_file …
Terraform Getting Started Notes
設定 Haproxy 以防止 DDOS 攻擊 TCP syn flood attacks vi /etc/sysctl.conf # Protection from SYN flood net.ipv4.tcp_syncookies = 1 net.ipv4.conf.all.rp_filter = 1 net.ipv4.tcp_max_syn_backlog = 1024 Slowloris like …
Kubernetes Runtime Explained in Plain Language