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 / 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:?}" ]]
@kkumler
kkumler / gist:91f23b3e385f21c254db13a590d80176
Created April 9, 2024 16:52
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 Homeberw 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 / 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 / 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()
{
"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 / 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:

@kkumler
kkumler / .config_git_attributes
Created December 8, 2017 20:40
Simple dicom git diff
*.dcm diff=dcmdump
@kkumler
kkumler / Resources.md
Created April 25, 2013 23:13 — forked from klamping/Resources.md
JavaScript testing resources, from @klamping's workshop.
d-i debian-installer/language string en
d-i debian-installer/country string AT
d-i debian-installer/locale string en_IE.UTF-8
d-i localechooser/supported-locales en_US.UTF-8, en_IE.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap string de
d-i keyboard-configuration/layoutcode string de
d-i keyboard-configuration/modelcode string pc105
d-i console-keymaps-at/keymap string de-latin1-nodeadkeys
default Ubuntu
label Ubuntu
kernel <%= @kernel %>
append initrd=<%= @initrd %> video=vga16fb:off vga16fb.modeset=0 interface=eth0 url=<%= foreman_url("provision")%> ramdisk_size=10800 root=/dev/rd/0 rw auto=true priority=critical hostname=unassigned-hostname DEBCONF_DEBUG=5 language=en locale=en_IE.UTF-8 console-setup/ask_detect=false keyboard-configuration/layoutcode=de console-keymaps-at/keymap=de-latin1-nodeadkeys keyboard-configuration/xkb-keymap=de debian-installer/country=AT debian-installer/fb=false BOOTIF=<%= mac %>