Skip to content

Instantly share code, notes, and snippets.

View colinhoglund's full-sized avatar
🐢
I like turtles.

Colin Hoglund colinhoglund

🐢
I like turtles.
View GitHub Profile
@colinhoglund
colinhoglund / delete_branches.sh
Created September 8, 2022 00:48
How To Delete Git Branches
# prune remote branches that no longer exist
git fetch --prune origin
# dry-run list of branches to delete
git push --dry-run --delete origin $(git branch --remotes --merged | grep -vE 'HEAD|master|main' | cut -d\/ -f2- | xargs)
# delete branches
git push --delete origin $(git branch --remotes --merged | grep -vE 'HEAD|master|main' | cut -d\/ -f2- | xargs)
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: