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
# Usage | |
# ./install-python.sh 3.7.8 | |
# | |
# Easy install using `curl`: | |
# curl | |
apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev \ | |
&& curl -L https://www.python.org/ftp/python/$1/Python-$1.tgz -o Python-$1.tgz \ | |
&& tar xvf Python-$1.tgz \ |
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
# This script calls the AWS STS API and retrieves a temporary session token. | |
usage() | |
{ | |
cat <<EOM | |
Usage: \$(aws-get-auth-token <auth token here>) | |
It's important to call as shown above with the dollar sign, so that the command generated by the script gets executed. |
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
#! /usr/bin/env python3 | |
import boto3 | |
import botocore | |
import json | |
import argparse | |
from pprint import pprint | |
# import sys |
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
name: $(Date:yyyyMMdd)$(Rev:.r) | |
trigger: | |
batch: true | |
branches: | |
include: | |
- release/* | |
- master | |
- develop | |
stages: | |
- stage: TestAndBuild |
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
#!/usr/bin/env python3 | |
import boto3 | |
import botocore | |
import argparse | |
from pprint import pprint | |
import re | |
import logging | |
parser = argparse.ArgumentParser(description="Sets S3 Access Logging configuration on all buckets within an account matching a certain pattern.") |
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 | |
error_exit() | |
{ | |
echo "$1" 1>&2 | |
exit 1 | |
} | |
CODEBUILD_PROJECT_NAME=$1 |
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
SET @@profiling = 0; | |
SET @@profiling_history_size = 0; | |
SET @@profiling_history_size = 100; | |
SET profiling = 1; | |
-- query here | |
SET profiling = 0; | |
SHOW profiles; |
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
$vault = Get-AzRecoveryServicesVault -ResourceGroupName euw-dbclus02 -Name euw-dbclus02-recoveryvault | |
$container = Get-AzRecoveryServicesBackupContainer -VaultId $vault.ID -ContainerType AzureVM | |
$PI = Get-AzRecoveryServicesBackupItem -Container $container -WorkloadType AzureVM -VaultId $vault.ID | |
Disable-AzRecoveryServicesBackupProtection -Item $PI -VaultId $vault.ID |
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 | |
chown -R demo:demo /data | |
if [ -z "$RUNAS" ] | |
then | |
exec runuser -u demo "$@" | |
else | |
exec "$@" | |
fi |