Skip to content

Instantly share code, notes, and snippets.

@kyouheicf
Last active June 8, 2021 03:46
Show Gist options
  • Save kyouheicf/2586561f10ed37503c7b99280af6a6ba to your computer and use it in GitHub Desktop.
Save kyouheicf/2586561f10ed37503c7b99280af6a6ba to your computer and use it in GitHub Desktop.
#!/bin/bash
cat <<EOF >> ~/.zshrc
alias myip4='dig +short @1.1.1.1 whoami.cloudflare ch txt | sed "s/\"//g"'
alias myip6='dig +short @2606:4700:4700::1111 -6 ch txt whoami.cloudflare | sed "s/\"//g"'
EOF
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment