Capturing and viewing DNS queries using tcpdump

tcpdump is an excellent tool for debugging network issues. Even though the name says TCP, it works just as well for capturing DNS requests which happen over UDP.

Parse mixed JSON logs with jq

If you have text with some lines having JSON output and some not, this jq shortcut can help you parse and format the JSON lines, helping make the output way more readable.