This is my collection of code snippets and commands for my reference. Maybe others can find some things helpful as well.
Two other better sources for examples are:
curl cht.sh/iptables
tldr nmap