This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%!xmllint --format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash array cheatsheet | |
Declare declare -a array=('a' 'b' 'c') | |
Length ${#array[@]} | |
Indices ${!array[@]} | |
Push n (append) array+=('i_0' ... 'i_n') | |
Pop n (bash>=4) unset 'array[-n]' | |
Pop n (bash<4) unset 'arr[${#arr[@]}-n]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zoneid=<<zoneid>> | |
bearer=<<bearer>> | |
curl \ | |
--header "Authorization: Bearer $bearer" \ | |
-s "https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records?per_page=50000" \ | |
| jq -r '.result[].id' \ | |
| xargs -n 1 -I {} -P 20 -- curl --silent --request DELETE \ | |
--header "Authorization: Bearer $bearer" \ | |
"https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records/{}" |
OlderNewer