Skip to content

Instantly share code, notes, and snippets.

View susovanpanja's full-sized avatar

Susovan Panja susovanpanja

  • Mohali
View GitHub Profile
@susovanpanja
susovanpanja / Makefile
Created May 25, 2023 14:31 — forked from ninjatux/Makefile
Makefile bootstrap
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@susovanpanja
susovanpanja / resignation.txt
Created June 28, 2021 16:16 — forked from QuinnyPig/resignation.txt
Templated resignation letter
Dear BOSS,
Please accept this letter as formal notification that I am resigning from my position as JOB TITLE with COMPANY. My last day will be DATE OF LAST DAY.
Thank you so much for the opportunity to work in this position for the past DURATION. I’ve greatly enjoyed and appreciated the opportunities I’ve had to WTF DID YOU DO, and I’ve learned many things, all of which I will take with me throughout my career.
During my last two weeks, I’ll do everything possible to wrap up my duties and train other team members. Please let me know if there’s anything else I can do to aid during the transition.
I wish COMPANY continued success, and I hope to stay in touch in the future.
Sincerely,
@susovanpanja
susovanpanja / refresh-certs.sh
Created May 27, 2020 09:05 — forked from ktsakalozos/refresh-certs.sh
Refresh MicroK8s Certs
#!/bin/bash
set -eu
export SNAP_NAME="microk8s"
export SNAP_DATA="/var/snap/microk8s/current/"
export SNAP="/snap/microk8s/current/"
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH"
source $SNAP/actions/common/utils.sh
@susovanpanja
susovanpanja / clean_old_lambda_versions.py
Created June 28, 2019 10:45 — forked from tobywf/clean_old_lambda_versions.py
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
susovanpanja / mongodb-s3-backup.sh
Created February 11, 2019 12:26 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` 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 backup.sh
# 7) Test it out via ./backup.sh
@susovanpanja
susovanpanja / wget-jdk-oracle-install-example.txt
Created June 11, 2018 08:10 — forked from sr75/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@susovanpanja
susovanpanja / cft-travis-sample.yml
Created April 10, 2018 12:38 — forked from grdnrio/cft-travis-sample.yml
Example Travis file for verifying CloudFormation templates
language: ruby
git:
submodules: false
env:
global:
- AWS_DEFAULT_REGION=eu-west-1
- secure: somestring
- secure: somestring
@susovanpanja
susovanpanja / sns-publish
Created March 26, 2018 06:47 — forked from jeremypruitt/sns-publish
AWS Lambda function to publish to SNS topic
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();
sns.publish({