Skip to content

Instantly share code, notes, and snippets.

View ilpianista's full-sized avatar

Andrea Scarpino ilpianista

View GitHub Profile
@ilpianista
ilpianista / unused-amis.sh
Created April 22, 2022 12:21
List all AMIs not in use by EC2 instances or AutoScalingGroups
#!/bin/bash
function our_amis() {
aws ec2 describe-images --owners self --query 'Images[*].ImageId' | jq -Sr '.[]'
}
function ec2_amis() {
aws ec2 describe-instances --query 'Reservations[*].Instances[*].ImageId' | jq -Sr '. | flatten | unique | .[]'
}
@ilpianista
ilpianista / gobinet.patch
Last active August 29, 2015 14:19 — forked from ivoronin/gobinet.patch
GobiNet patch to build with Linux 4.0.0
diff -Naur GobiNet.old/GobiUSBNet.c GobiNet/GobiUSBNet.c
--- GobiNet.old/GobiUSBNet.c 2015-04-22 19:45:17.553791454 +0200
+++ GobiNet/GobiUSBNet.c 2015-04-22 19:46:29.299686755 +0200
@@ -66,11 +66,15 @@
#define DRIVER_AUTHOR "Qualcomm Innovation Center"
#define DRIVER_DESC "GobiNet"
+#ifdef bool
+#undef bool
+#endif