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
| #! /bin/bash | |
| wget -mk http://kotblog.dash.org/ |
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
| zy |
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
| curl --include \ | |
| --no-buffer \ | |
| --header "Connection: Upgrade" \ | |
| --header "Upgrade: websocket" \ | |
| --header "Host: example.com:80" \ | |
| --header "Origin: http://example.com:80" \ | |
| --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
| --header "Sec-WebSocket-Version: 13" \ | |
| http://example.com:80/ |
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
| FROM alpine:3.5 | |
| RUN /bin/echo 'set -o vi' >> /etc/profile | |
| RUN /bin/echo 'gem: --no-document' > /etc/gemrc | |
| RUN apk update && apk upgrade && apk add --no-cache ruby ruby-dev ruby-io-console ruby-bigdecimal ruby-json ca-certificates && rm -fr /var/cache/apk/* | |
| WORKDIR /app | |
| COPY Gemfile Gemfile.lock query-resources.rb /app/ | |
| RUN gem install bundler |
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
| #! /bin/bash | |
| # DigitalOcean cloud-init metadata IP address helper script | |
| METADATA_URL="http://169.254.169.254/metadata" | |
| PUBLIC_IPV4="$(curl -fs -m 2 $METADATA_URL/v1/interfaces/public/0/ipv4/address)" | |
| ANCHOR_IPV4="$(curl -fs -m 2 $METADATA_URL/v1/interfaces/public/0/anchor_ipv4/address)" | |
| FLOATING_ACTIVE="$(curl -fs -m 2 $METADATA_URL/v1/floating_ip/ipv4/active)" | |
| FLOATING_IPV4="$(curl -fs -m 2 $METADATA_URL/v1/floating_ip/ipv4/ip_address)" |
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
| #! /usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use feature qw(say); | |
| use Data::Dumper; | |
| use File::Slurp; | |
| use Carp; | |
| use Fcntl ':mode'; | |
| use DateTime; |
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
| # `aws s3 sync` the cloudtrail files you want into a dir, then... | |
| cat * | jq '.Records[] | select(.eventSource == "kms.amazonaws.com")' | jq '.userIdentity.arn' |
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
| #! /bin/bash | |
| # get Ubuntu 16.04 AMI for default region | |
| aws ec2 describe-images --filters Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170221 | jq -r '.Images[].ImageId' | |
| # get same image AMI for ca-central-1 | |
| aws --region ca-central-1 ec2 describe-images --filters Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170221 | jq -r '.Images[].ImageId' |