Skip to content

Instantly share code, notes, and snippets.

@colinhoglund
colinhoglund / git-cleanup.sh
Last active March 13, 2026 20:57
How To Delete Git Branches
#!/usr/bin/env bash
set -euo pipefail
DRY_RUN=true
if [[ "${1:-}" == "--execute" ]]; then
DRY_RUN=false
fi
git fetch --prune
package retryer
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/request"
)
// Retryer implements a custom DefaultRetryer
# EC2 available volumes
aws ec2 describe-volumes \
--filter Name=status,Values=available \
--query "Volumes[].[VolumeId,Size,CreateTime,Tags[?Key=='Name'].Value|[0]]" \
--output text
# EC2 stopped instances
aws ec2 describe-instances \
--filter Name=instance-state-name,Values=stopped \
--query "Reservations[].Instances[].[InstanceId,InstanceType,LaunchTime,Tags[?Key=='Name'].Value|[0]]" \

Keybase proof

I hereby claim:

  • I am colinhoglund on github.
  • I am colinhoglund (https://keybase.io/colinhoglund) on keybase.
  • I have a public key ASBWC32INFEoqurb-F8RC9Yz-_EIwLdXRGhlzKHGHsTN_Qo

To claim this, I am signing this object: