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/sh | |
# List objects in an S3 bucket and generate a CSV manifest suitable for | |
# driving an S3 Batch Job. Works for smol buckets. Just pass a valid S3 URL. | |
# | |
# Usage: | |
# | |
# ./create_manifest.sh s3://muh-buckit/muh-prefix/ | |
# | |
NUM_ARGS=$# |
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 timoguin on github. | |
* I am timoguin (https://keybase.io/timoguin) on keybase. | |
* I have a public key ASASOw1l4f5hOtmgIXRXcpAqiydqiYFZZgykaewaEpvvqwo | |
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
set -ex | |
# Use the GitHub CLI to loop through all repositories in an organization, get all the | |
# open issues, and add them to a single org-level project. | |
# | |
# Note: This was originally done with GNU Parallel but was refactored with a slower for | |
# loop due to hitting GitHub rate limits. | |
# Loop through list of repos | |
for repo in $(gh repo list tiki --json owner,name --jq '.[] | (.owner.login + "/" + .name)'); do |
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
from pyspark.sql import DataFrame | |
import boto3 | |
GLUE_CLIENT = boto3.client("glue", region_name="us-east-2") | |
def get_table_metadata_location(glue_client, table: str) -> str: | |
""" |
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
# =========================================================================== # | |
# | |
# Proposed arguments for DynamoDB query data source, using an HCL example. | |
# | |
# Status: Initial Design | |
# | |
# --------------------------------------------------------------------------- # | |
# | |
# We would want to stick pretty closely to DynamoDB's Query API for this: | |
# https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html |
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
# IAM policy for all users that requires MFA | |
data "aws_iam_policy_document" "require_mfa_policy" { | |
statement { | |
sid = "AllowAllUsersToListAccounts" | |
effect = "Allow" | |
actions = [ | |
"iam:ListAccountAliases", | |
"iam:ListUsers", | |
] |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "NonResourceBasedReadOnlyPermissions", | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:DescribeVolumes", | |
"ec2:DescribeKeyPairs", | |
"ec2:DescribeSecurityGroups", |
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 files_list = salt['file.find']('/path/', name='*pattern*') %} | |
{% if files_list|length > 0 %} | |
{% set filename = files_list[0] %} | |
{% endif %} | |
ensure managed file: | |
file.managed: | |
- name: {{ 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
salt@master01:~$ salt web01.flexdeaf.dev cmd.run 'ufw allow proto tcp from 192.168.1.115 to any port 9997' | |
web01.flexdeaf.dev: | |
Rules updated | |
salt@master01:~$ salt web01.flexdeaf.dev state.single cmd.run 'ufw allow proto tcp from 192.168.1.115 to any port 9998' | |
web01.flexdeaf.dev: | |
---------- | |
ID: ufw allow proto tcp from 192.168.1.115 to any port 9998 | |
Function: cmd.run | |
Result: True | |
Comment: Command "ufw allow proto tcp from 192.168.1.115 to any port 9998" run |
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
platforms: | |
- name: ubuntu-12.04 | |
driver_config: | |
box: ubuntu-12.04-cloudimg | |
box_url: http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-amd64-disk1.box |
NewerOlder