Skip to content

Instantly share code, notes, and snippets.

Susovan Panja susovanpanja

Block or report user

Report or block susovanpanja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
susovanpanja /
Created Jun 28, 2019 — forked from tobywf/
A quick script to remove old AWS Lambda function versions
from __future__ import absolute_import, print_function, unicode_literals
import boto3
def clean_old_lambda_versions():
client = boto3.client('lambda')
functions = client.list_functions()['Functions']
for function in functions:
versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions']
for version in versions:
susovanpanja /
Created Feb 11, 2019 — forked from eladnava/
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
# Make sure to:
# 1) Name this file `` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x
# 7) Test it out via ./
View Escaping Special Characters
The following characters have special meaning to the shell itself in some contexts and may need to be escaped in arguments:
` Backtick (U+0060 Grave Accent)
~ Tilde (U+007E)
! Exclamation mark (U+0021)
# Hash (U+0023 Number Sign)
$ Dollar sign (U+0024)
& Ampersand (U+0026)
* Asterisk (U+002A)
( Left Parenthesis (U+0028)
susovanpanja / wget-jdk-oracle-install-example.txt
Created Jun 11, 2018 — forked from scottvrosenthal/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
View wget-jdk-oracle-install-example.txt
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"" \
-O jdk-7-linux-x64.rpm
# ubuntu
susovanpanja / cft-travis-sample.yml
Created Apr 10, 2018 — forked from grdnrio/cft-travis-sample.yml
Example Travis file for verifying CloudFormation templates
View cft-travis-sample.yml
language: ruby
submodules: false
- secure: somestring
- secure: somestring
susovanpanja / sns-publish
Created Mar 26, 2018 — forked from jeremypruitt/sns-publish
AWS Lambda function to publish to SNS topic
View sns-publish
console.log('Loading function');
var AWS = require('aws-sdk');
AWS.config.region = 'us-west-2';
exports.handler = function(event, context) {
console.log("\n\nLoading handler\n\n");
var sns = new AWS.SNS();
You can’t perform that action at this time.