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 -e | |
workspace="$1" | |
environment="$2" | |
state_bucket="${3:-terraform-state-bucket}" | |
usage(){ | |
echo "Usage: $0 [workspace_name] [environment_name] (state_bucket_optional)" |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Deny", | |
"Action": [ | |
"lambda:CreateFunctionUrlConfig", | |
"lambda:UpdateFunctionUrlConfig" | |
], | |
"Resource": "arn:aws:lambda:*:*:function:*", |
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
# Distribution / packaging | |
.Python | |
env/ | |
build/ | |
develop-eggs/ | |
dist/ | |
downloads/ | |
eggs/ | |
.eggs/ | |
lib/ |
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 | |
usage() { | |
echo "$0 [SRC] [DST]" | |
echo "Example iCloud path: /Users/$(whoami)/Library/Mobile Documents/com~apple~CloudDocs/" | |
exit 99 | |
} | |
[[ -z "$1" || -z "$2" ]] && usage |
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 | |
# Reads a list of profile names from a file in the local directory. Example provided. | |
set -e | |
# If a profiles.txt file doesn't exist in the current dir, fail. | |
[[ -f profiles.txt ]] && echo "profiles.txt found, continuing..." || echo "Please provide a profiles.txt with profile names separated by new lines." |
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 | |
# https://github.com/pyotp/pyotp | |
import pyotp | |
import argparse | |
parser = argparse.ArgumentParser(description='Get the TOTP code, for an MFA string, right now.') | |
parser.add_argument('mfa_string', metavar='mfa_string', type=str, help='The MFA string to get the current totp code for.') | |
args = parser.parse_args() |
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
# 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="/Users/$(whoami)/.oh-my-zsh" | |
HISTFILE=~/.zsh_history | |
# Keep history, forever | |
HISTSIZE=999999999 | |
SAVEHIST=$HISTSIZE | |
setopt SHARE_HISTORY |
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 | |
from azure.servicebus import QueueClient, Message | |
import sys, os | |
def main(): | |
if 'SERVICEBUS_CONN_STRING' in os.environ: | |
connection_string = os.getenv("SERVICEBUS_CONN_STRING") | |
else: | |
print("Please provide connection string as envvar: SERVICEBUS_CONN_STRING") |
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') |
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 |
NewerOlder