This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Node.js code to demonstrate https calls. | |
* @author athakur | |
*/ | |
const https = require("https"); | |
var startDemo = function () { | |
console.log("starting demo code"); | |
executeHttps(function (err, data) { | |
if (err) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.osfg; | |
import java.util.Scanner; | |
/** | |
* | |
* @author aniket | |
* | |
* Basic Calculator program in Java | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'); | |
//TODO : change this region based in your SQS service region | |
AWS.config.update({region: 'ap-south-1'}); | |
var sqs = new AWS.SQS({apiVersion: '2012-11-05'}); | |
//TODO : change this URL based in your queue URL | |
var queueURL = "https://sqs.ap-south-1.amazonaws.com/499222264523/my-queue"; | |
var params = { | |
AttributeNames: [ | |
"SentTimestamp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#---------------------------------------------------- | |
# Author : athakur | |
# Version : 1.0 | |
# Create Date : 27/02/2018 | |
# Update Date : 27/02/2018 | |
# Description : Create gif from a video | |
# Sample usage : ./creategif.sh input.mp4 output.gif | |
# ffmpeg static build can be downloaded from https://johnvansickle.com/ffmpeg/ | |
#---------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#---------------------------------------------------- | |
# Author : athakur | |
# Version : 1.0 | |
# Date : 10/02/2018 | |
# Description : Deployment script to update lambda code and env variables | |
# Sample usage : | |
# Local : ./update-lambda.sh test aws-admin fileb://../lambda.zip | |
# Dev : ./update-lambda.sh dev aws-admin fileb://../lambda.zip | |
# QA : ./update-lambda.sh qa aws-admin fileb://../lambda.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#For more detials refer http://opensourceforgeeks.blogspot.in/2018/01/how-to-set-up-squid-proxy-with-basic.html | |
acl SSL_ports port 443 | |
acl Safe_ports port 80 # http | |
acl Safe_ports port 21 # ftp | |
acl Safe_ports port 443 # https | |
acl Safe_ports port 70 # gopher | |
acl Safe_ports port 210 # wais | |
acl Safe_ports port 1025-65535 # unregistered ports | |
acl Safe_ports port 280 # http-mgmt | |
acl Safe_ports port 488 # gss-http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @id noWhiteBackgroundColor-gray | |
// @name noWhiteBackgroundColor-gray | |
// @version 1.0 | |
// @namespace | |
// @author athakur | |
// @description GM script that automatically changes background colors that are too white. | |
// @include * | |
// @exclude | |
// @run-at document-start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name PageRedirectScript | |
// @include http://domain1/* | |
// @include https://domain1/* | |
// @run-at document-start | |
// @description Redirects page from one domain to another. Note if domain1 is down you need to add entry in /etc/hosts file as "ipOfDomain2 domain1 domain2". You can get the ipOfDomain2 as "ping domain2" | |
// @namespace http://opensourceforgeeks.blogspot.in/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
NewerOlder