Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View duaraghav8's full-sized avatar

Raghav duaraghav8

View GitHub Profile
@duaraghav8
duaraghav8 / ebs-snapshot-cleanup.py
Last active April 15, 2020 08:57
Cleanup old EBS snapshots and AMIs
# NOTE: This script is extremely destructive. Be sure to understand it before using.
# This Script deletes all old snapshots and AMIs from Amazon EBS. It only retains the latest snapshot and AMI for each volume whose snapshots exist.
# It has been tested with Python3
import boto3
# Fill this up or use sts.get_caller_identity()
AWS_ACCOUNT_ID = ""

Keybase proof

I hereby claim:

  • I am duaraghav8 on github.
  • I am duaraghav8 (https://keybase.io/duaraghav8) on keybase.
  • I have a public key ASAFdIld9-VlTblp8d2oQw_7i4Ddtel2erV_Y-9hoA5UVwo

To claim this, I am signing this object:

@duaraghav8
duaraghav8 / install-python-27-on-centos-6.sh
Created October 9, 2018 08:41
Install Python 2.7 on Centos 6
#!/bin/bash
# Installs Python 2.7 alongside Python2.6 (which still remains the default python) on a Centos 6 machine.
sudo yum install https://$(rpm -E '%{?centos:centos}%{!?centos:rhel}%{rhel}').iuscommunity.org/ius-release.rpm
yum -y install python27 python27-devel python27-pip python27-setuptools python27-virtualenv --enablerepo=ius
0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000b6c6f6461206c616873756e000000000000000000000000000000000000000000
{
"extends": "solium:all",
"rules": {
"quotes": [
"error",
"double"
],
"indentation": [
"error",
4
#!/usr/bin/env node
'use strict';
/*
tabber.js: Add N extra tabs at the beginning of each line of code
usage:
./tabber.js <filename> <no_of_tabs> > <output_filename>
*/