Skip to content

Instantly share code, notes, and snippets.

View aniket91's full-sized avatar

Aniket Thakur aniket91

View GitHub Profile
@aniket91
aniket91 / RecoverFiles.sh
Created October 15, 2016 19:12
Shell script to recover deleted files on Linux
#!/bin/bash
if [[ ! $1 ]]; then
echo -e "Usage:\n\n\t$0 'file name'"
exit 1
fi
f=$(ls 2>/dev/null -l /proc/*/fd/* | fgrep "$1 (deleted" | awk '{print $9}')
if [[ $f ]]; then
@aniket91
aniket91 / email_ses.js
Created August 16, 2018 15:32
Node.js code snippet to send email using AWS SES service
const aws = require('aws-sdk');
aws.config.loadFromPath('./config.json');
const ses = new aws.SES();
/**
* author: athakur
* aws ses create-template --cli-input-json fileb://test_template.json --region us-east-1 --profile osfg
* aws ses update-template --cli-input-json fileb://test_template.json --region us-east-1 --profile osfg
* @param {*} callback
*/