This directory contains utility scripts for maintaining and validating the ZoneDB database.
Purpose: Quick DNS resolution checker for individual domains.
| Tool | Primary Question it Answers | Best For... |
|---|---|---|
ping |
"Are you online and can I reach you?" | Basic connectivity checks |
nslookup |
"What's the IP address for this domain?" | Quick, simple DNS lookups, especially on Windows |
host |
"What's the IP/MX record for this domain?" | Clean, easy-to-read DNS lookups |
dig |
"Give me all the DNS details for this domain." | Detailed DNS troubleshooting and scripting |
whois |
"Who owns this domain?" | Finding domain registration and ownership info |
traceroute |
"What network path do my packets take to reach you?" | Diagnosing latency and routing problems |
| .PHONY: test-fuzz | |
| test-fuzz: ## Run fuzz tests | |
| ifeq ($(strip $(GO_FUZZARGS)),) | |
| @status=0; \ | |
| for pkg in $$(go list ./...); do \ | |
| for test in $$(go test -list=^Fuzz $$pkg | grep '^Fuzz'); do \ | |
| echo ">>> Fuzzing $$pkg $$test"; \ | |
| if ! go test -fuzz=$$test -fuzztime=10s $$pkg; then \ | |
| echo "❌ FAIL: $$pkg $$test"; \ | |
| status=1; \ |
| #!/usr/bin/env bash | |
| cleanup() { | |
| echo ">>> cleanup called (reason: $1)" | |
| } | |
| # Trap EXIT, INT, TERM | |
| # In the following code we're passing the 'signal' as an argument to the cleanup function. | |
| # | |
| # trap 'cleanup EXIT' EXIT |
The config file is stored here:
~/.config/humanlog/config.json
The only thing I really configure is formatter.themes.dark.levels.debug.foreground.html_hex_color, which I set to #8CBBFF:
Tip
You can view via humanlog config show.
Tip
"I think many people misunderstand the purpose of code review. The purpose of code review is not for the reviewer to find bugs, and certainly not for them to ensure that the code is bug-free. Anyone who depends on code review to find bugs is living in a fool's paradise. As everyone should know by now, it is not in general possible to find bugs by examining the code.
The primary purpose of code review is to find code that will be hard to maintain. The reviewer looks at the code and tries to understand what it is doing and how. If they can't, that means it will be hard to maintain in the future, and should be fixed now, while the original author is still familiar with it." -- https://infosec.exchange/@[email protected]/115096720467521263
The following commands will indicate if the specified file (/tmp/cache-lazy-op) was modified more than 60 minutes ago:
find "/tmp/cache-lazy-op" -mmin +60
fd cache-lazy-op /tmp --type f --changed-before 60mThe find command is more readily available and simpler to remember, but some people prefer more modern tools like fd.
| // https://go.dev/play/p/IwFfNFlIq_x | |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "github.com/dromara/dongle" | |
| "github.com/google/uuid" | |
| ) |
| # Example configuration that's quite detailed in its approach. | |
| # .github/dependabot.yaml | |
| version: 2 | |
| updates: | |
| - package-ecosystem: github-actions | |
| directory: "/" | |
| schedule: | |
| day: monday | |
| interval: weekly |