This file contains 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 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 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 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 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 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 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 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
# .bashrc | |
# Colorized Prompt | |
BLACK="\[\033[0;30m\]" | |
BLUE="\[\033[0;34m\]" | |
GREEN="\[\033[0;32m\]" | |
CYAN="\[\033[0;36m\]" | |
RED="\[\033[0;31m\]" | |
PURPLE="\[\033[0;35m\]" | |
BROWN="\[\033[0;33m\]" |
This file contains 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 | |
NAME_FORMAT="$(date +%d%m%y-azure-%H%M%S)" | |
# Set these | |
SSH_KEY_VALUE="" | |
RESOURCE_GROUP="" | |
LOCATION="" # Region the instance is in | |
SEC_GROUP="" # Network security group - using a pre-made here | |
VNET="" # virtual network to create in |