I hereby claim:
- I am serkanh on github.
- I am serkanh (https://keybase.io/serkanh) on keybase.
- I have a public key ASAp7DwjZ8IGntWVJpj59AHS8q3F0W91Z9t7x__65HSocwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| find . -name "*.log" -print0 | xargs -0 -I file cat file > ~/combined.log |
| #!/bin/bash | |
| #original https://gist.github.com/weavenet/f40b09847ac17dd99d16 | |
| bucket=$1 | |
| set -e | |
| echo "Removing all versions from $bucket" | |
| versions=`aws --region=us-west-2 s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
| markers=`aws --region=us-west-2 s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
| #If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH=$HOME/.oh-my-zsh | |
| # Set name of the theme to load. Optionally, if you set this to "random" | |
| # it'll load a random theme each time that oh-my-zsh is loaded. | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
| ZSH_THEME="robbyrussell" |
| #!/bin/bash | |
| set -euox pipefail | |
| echo "Please enter profile to use" | |
| read PROFILE | |
| echo "Please enter region to use" | |
| read REGION | |
| echo "Please enter ELBPORT to use" | |
| read ELBPORT |
| #/bin/bash | |
| #set -x | |
| #set -o | |
| CLUSTER_NAME=${1:-"dev1"} | |
| BASTION_NAME=${2:-"ha-bastion"} | |
| PROFILE_NAME=${3:-"HA"} | |
| CONTAINER_INSTANCE=$(aws --profile="${PROFILE_NAME}" ecs list-container-instances --cluster "${CLUSTER_NAME}" --query [containerInstanceArns][0][*] --output text | xargs -n1 -I{} echo {} | cut -d '/' -f 2) | |
| #encrypt text | |
| aws --profile=jumpstart kms encrypt \ | |
| --key-id <YOUR-KEY-ID> \ | |
| --plaintext fileb://test \ | |
| --query CiphertextBlob \ | |
| --output text | base64 --decode > testencrypted.txt | |
| #decrypt text | |
| aws --profile=jumpstart kms decrypt \ | |
| --ciphertext-blob fileb://testencrypted.txt \ |
| #!/bin/bash | |
| set -euox pipefail | |
| echo "Please enter profile to use" | |
| read PROFILE | |
| echo "Please enter region to use" | |
| read REGION | |
| echo "Please enter ELBPORT to use" | |
| read ELBPORT |
| _sourceCategory=aws/elb/appwest | parse "* *:* *:* * * * * * * * \"* *://*:*/* HTTP" as datetime, clientIP, port, backend, backend_port, requestProc, ba_Response, cli_Response, ELB_StatusCode, be_StatusCode, rcvd, send, method, protocol, domain, server_port, path | |
| | where !(be_statuscode matches "304") | |
| ------------------------- | |
| _sourceCategory=aws/elb/appwest | parse "* *:* *:* * * * * * * * \"* *://*:*/* HTTP" as datetime, clientIP, port, backend, backend_port, requestProc, ba_Response, cli_Response, ELB_StatusCode, be_StatusCode, rcvd, send, method, protocol, domain, server_port, path | |
| | where !(be_statuscode matches "304") AND !(be_statuscode matches "200") | |
| | sort by path asc |
| console.log('Loading function'); | |
| var AWS = require('aws-sdk'); | |
| AWS.config.region = 'us-east-1'; | |
| // Hipchat room notification auth token, as per: https://www.hipchat.com/docs/apiv2/auth | |
| // Make sure to create it per token | |
| var authToken = 'API-TOKEN-PER-ROOM'; | |
| var critical = 'true'; | |
| // Hipchat server and room name |