Skip to content

Instantly share code, notes, and snippets.

View kkumler's full-sized avatar
Verified

Kris Kumler kkumler

Verified
View GitHub Profile
@kkumler
kkumler / keybase.md
Created January 10, 2018 19:57
keybase.md

Keybase proof

I hereby claim:

  • I am kkumler on github.
  • I am kkumler (https://keybase.io/kkumler) on keybase.
  • I have a public key ASBxMX3sDYIPNPtC11O16lLeRTkGFnFawhH56VmAlQBkvgo

To claim this, I am signing this object:

{
"title": "Change option+x to c, for when your c key breaks",
"rules": [
{
"description": "Change option+x to c",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "x",
@kkumler
kkumler / whatFilesHaveIShared.gs
Created June 24, 2019 15:00 — forked from danjargold/whatFilesHaveIShared.gs
Google script to list (on a Google Sheet) all files shared in your google drive, including all viewers, editors, and sharing permissions. Credit goes to @woodwardtw (https://gist.github.com/woodwardtw/22a199ecca73ff15a0eb) as this is an improvement on his code which only assesses a single folder and one level of sub-folders down.
function listFolders(folder) {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name", "Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]); //writes the headers
//var folder = DriveApp.getFolderById("INSERT_YOUR_FILE_ID");//that long chunk of random numbers/letters in the URL when you navigate to the folder
//getLooseFiles(folder, sheet);
//getSubFolders(folder, sheet);
//instead of getting folder by ID rather get all folders and cycle through each. Note this will miss loose files in parent directory.
var folder = DriveApp.getFolders()
@kkumler
kkumler / get-parameters.sh
Last active October 25, 2022 17:09
Get a set of parameters from Systems Manager Parameter Store and format them for use as environment variables
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# As is the classic warning, this is so far light on error handling.
# Get a set of parameters from Systems Manager Parameter Store and format them for use as environment variables
# Usage: ./get-parameters.sh [--export] prefix [prefix...]
# Options:
@kkumler
kkumler / gist:91f23b3e385f21c254db13a590d80176
Last active October 22, 2024 16:02
AWS service compatibility for a region
# Given a file with a list of required services, sorted
# This could be created by aws ssm get-parameters-by-path --path /aws/service/global-infrastructure/regions/us-east-1/services --query 'Parameters[].Name' --output yaml | cut -d'/' -f8 | sort > aws-services-us-east-1.txt
# And using GNU coretools (prefixed here with g, as usual with Homebrew on macos)
# Environment variables AWS_PROFILE & REGION exported
gcomm -2 -3 required-services.txt <(aws ssm get-parameters-by-path --path /aws/service/global-infrastructure/regions/$REGION/services --query 'Parameters[].Name' --output yaml | cut -d'/' -f8 | sort)
@kkumler
kkumler / clear-task-definitions.sh
Last active April 12, 2024 14:46
Remove AWS ECS Task Definitions in bulk
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
FAMILY_PREFIX=""
# Ensure variables are set, that we don't directly use. This works do to the nounset option.
[[ "${AWS_PROFILE:?}" ]]