Last active
September 4, 2020 07:31
-
-
Save dhsathiya/da3981bdc71a126ac875bacb44e801a1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# <droplet name> <droplet IP> | |
doctl compute droplet list -o json | jq -r '.[] | "\(.name) \(.networks.v4[].ip_address)"' | |
# <instance tag value: Name> | |
aws ec2 describe-instances | jq -r ".Reservations[].Instances[].Tags[].Value" | perl -lne "print unless /Backup/" | |
# <Instance IP> <Instance tag value: Name> | |
aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | "\(.PublicIpAddress) \(.Tags[].Value)"' | perl -lne "print unless /Backup/" | |
# cURL headers | |
curl -XGET -IL https://example.com | |
# Get response code | |
curl -XGET -IL -w 'code: %{response_code}' https://example.com | |
# WP S3-Uploads | |
aws s3 cp s3://example.com/wp-content/uploads s3://example.com/wp-content/uploads --recursive --metadata-directive REPLACE --acl public-read --cache-control max-age=2592000,public |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment