Skip to content

Instantly share code, notes, and snippets.

@polarnik
polarnik / nginx.conf
Last active November 15, 2023 17:54
Nginx config for connecting Grafana with InfluxDB (COSR settings problem) with cache (perf improvment)
#user nobody
worker_processes 4;
error_log /var/log/nginx/error.log warn;
events {
worker_connections 1024;
}
http {
@githubfoam
githubfoam / tcpdump cheat sheet
Last active November 30, 2025 21:00
tcpdump cheat sheet
----------------------------------------------------------------------------------------------------
tcpdump -s 0 #capture entire etherner header and IP packet
tcpdump -ni tap55ec3c7f-91 ip6 #locate the ICMPv6 packets
tcpdump -s0 -n -i any -w /tmp/$(hostname)-smbtrace.pcap #if the SMB client or SMB server is a Unix host,Troubleshooting Server Message Block (SMB)
tcpdump -D #Print the list of the network interfaces available on the system and on which tcpdump can capture packet
tcpdump -X -vvv -n -i eth0
@gembin
gembin / mysql_waiting_for_table_metadata_lock.md
Last active December 22, 2023 11:09
MySQL - Waiting for table metadata lock
SHOW ENGINE INNODB STATUS \G

Look for the Section -

TRANSACTIONS
@igorkamyshev
igorkamyshev / docker-compose.yml
Last active January 17, 2023 15:52
docker-gen + letsencrypt-nginx-proxy-companion
version: '3'
services:
nginx-web:
image: nginx
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
container_name: ${NGINX_WEB:-nginx-web}
restart: always
ports:
- "${IP:-0.0.0.0}:80:80"
@wtw24
wtw24 / docker_rus.md
Last active April 26, 2026 20:48
Шпаргалка с командами Docker

Шпаргалка с командами Docker

1552317264965 1552317537397 1552317711879

1552318467562 1552318531067 1552318577900 1552318614839

@ZhangChen199102
ZhangChen199102 / .direnvrc
Last active June 14, 2025 10:41
Setup direnv + pyenv + pyenv-virtualenv
# use a certain pyenv version
use_python() {
if [ -n "$(which pyenv)" ]; then
local pyversion=$1
pyenv local ${pyversion}
fi
}
layout_virtualenv() {
local pyversion=$1
@jkullick
jkullick / block-tor-exit-nodes-iptables.md
Last active April 22, 2025 11:36
Block Tor Exit Nodes with IPTables
  1. Install ipset:
apt-get install ipset
  1. Create new ipset:
ipset create tor iphash
@RafPe
RafPe / vyos-optimisations
Last active October 30, 2024 21:54
vyos throughput optimizations
Server 2 sockets,6 cores each, 2.4ghz
# Set ixgbe options
# Limit RSS queues to the number of physical cores per cpu
# Disable offload
# When you change this, you need to run the command and reboot for it to take.
echo "options ixgbe LRO=0,0 MQ=1,1 RSS=6,6 VMDQ=0,0 vxlan_rx=0,0" > /etc/modprobe.d/ixgbe.conf
# Shut down HT cores
for i in $(seq 1 2 23); do