Skip to content

Instantly share code, notes, and snippets.

View wokoman's full-sized avatar

Michal Kozák wokoman

View GitHub Profile
@wokoman
wokoman / change-sets-cleanup.sh
Last active March 12, 2024 14:22
Script to cleanup failed CloudFormation change sets
#!/bin/bash
# Takes args in this order: region, prefix, profile
# Example: bash change-sets-cleanup.sh eu-west-1 kbc- AWS-profile-foo-bar-eu-west-1-AWSAdministratorAccess
# Setting AWS_PROFILE variable to be super safe
export AWS_PROFILE=$3
stacks=$(aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE UPDATE_COMPLETE --query "StackSummaries[?starts_with(StackName, \`$2\`) == \`true\`].StackName" --output text --region "$1" --profile "$3")
for stack in $stacks; do
echo "${stack}: cleaning up change sets"
@wokoman
wokoman / onedriver_sorter.py
Created November 1, 2021 06:27
Script to move photos into folder per their time-stamped name
"""
Simple script that moves files to folders accordingly to their name. Files must start with YYYYMM format.
Useful for old automatic media uploads by OneDrive iOS app (aka SkyDrive).
"""
import os
import shutil
from pathlib import Path
directory = '/path/to/files/'

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: