Skip to content

Instantly share code, notes, and snippets.

@cqsd
Last active April 22, 2020 18:15
Show Gist options
  • Save cqsd/9f57e3ff134d0431d65cedb08c5f22ef to your computer and use it in GitHub Desktop.
Save cqsd/9f57e3ff134d0431d65cedb08c5f22ef to your computer and use it in GitHub Desktop.
snippets
# find people who put their place of work in their twitter bio
site:twitter.com -inurl:status -inurl:statuses -inurl:lists -inurl:COMPANY "@COMPANY"
# select successfully resolved domains from massdns ndjson output
jq -c '. | select(.status == "NOERROR") | select(.data | has("answers"))'
# example
for d in $(jq -c '.data.answers[] | select(.type == "A") | .name' < records.json); do
echo -n "$d "
curl -sL --connect-timeout 2 $d >/dev/null \
&& echo live \
|| echo timeout
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment