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 | |
| RESOURCE_GROUP="$1" | |
| OS_DISK="$2" | |
| err_and_exit(){ | |
| if [[ -z "$RESOURCE_GROUP" || -z "$OS_DISK" ]] ; then | |
| echo "Supply the Resource Group as argument 1. Supply the VHD image argument 2, including full path in blob storage." | |
| fi | |
| } |
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 | |
| set -ex | |
| ##################################################################################################################### | |
| # 1. Change the aws_cmd function to match the naming of your aws credentials | |
| # 2. Check the DATA_PATH var is where your files are ON S3 (or wherever else) | |
| # 3. Make sure you're using the right SSH key | |
| ##################################################################################################################### |
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 | |
| KEY_NAME=blah | |
| SG_ID=blah | |
| SUBNET_ID=blah | |
| AWS_PROFILE=blah | |
| AWS_REGION=eu-west-2 | |
| aws_cmd(){ | |
| aws --profile $AWS_PROFILE --region $AWS_REGION "$@" |
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 | |
| COMMAND="$1" | |
| TF_FILE="$2" | |
| usage(){ | |
| echo "Usage: $0 (plan|apply|destroy) [tf-filename]" | |
| } | |
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
| //We want to allow the use of two KMS keys from Account A to an IAM User in account B. | |
| //Attach these two SIDs to your user policy in Account B. | |
| { | |
| "Sid": "AllowUseOfKMSKeysFromAccountA", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "kms:Encrypt", | |
| "kms:Decrypt", | |
| "kms:ReEncrypt*", |
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
| $action = New-ScheduledTaskAction -Execute "powershell" -Argument " we -File C:\Users\Administrator\Documents\WindowsPowerShell\write-ram-cw-custom-metric.ps1 -ExecutionPolicy bypass" | |
| $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 1) | |
| Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "CustomRAMCloudWatchMetricWrite" -Description "Logging percentage free memory to CloudWatch for this instance" |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am immanuelpotter on github. | |
| * I am immanuelpotter (https://keybase.io/immanuelpotter) on keybase. | |
| * I have a public key ASC6arnPIwraZCSzMt9Cvhvw1RPU-M4Jz3EQB_Ry4jGp3go | |
| To claim this, I am signing this object: |
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 | |
| # Ensure an S3 full access role is attached. | |
| # Install TPC-H benchmarking tools on an rpm-based Linux machine, and generate two datasets: 10GB and 40GB of tabular data respectively. | |
| # Create a bucket for storage of the generated data and upload to S3. | |
| # Install tools | |
| sudo yum install -y make git gcc | |
| git clone https://github.com/gregrahn/tpch-kit |
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/env python | |
| import requests | |
| import sys | |
| import pprint | |
| import base64 | |
| def encode_string(token): | |
| to_encode_string = "Basic:" + token | |
| encoded_str = base64.b64encode(to_encode_string.encode()).decode('utf-8') |