Skip to content

Instantly share code, notes, and snippets.

@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active June 5, 2024 12:23
AWS EBS - Find unused snapshots

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help
@nijikokun
nijikokun / jsonToMarkdownTable.js
Last active August 29, 2018 12:11
JSON to Markdown Table
function jsonToMarkdownTable (array, columns) {
var cols = columns
? columns.split(",")
: Object.keys(array[0])
var table = ""
table += cols.join(" | ")
table += "\r\n"
table += cols.map(function () {
@aspyct
aspyct / signal.c
Last active February 19, 2024 11:24
Unix signal handling example in C, SIGINT, SIGALRM, SIGHUP...
/**
* More info?
* a.dotreppe@aspyct.org
* http://aspyct.org
*
* Hope it helps :)
*/
#include <stdio.h>
#include <stdlib.h>