Skip to content

Instantly share code, notes, and snippets.

View guddukhan1987's full-sized avatar
💻
Explore the

Guddu Khan guddukhan1987

💻
Explore the
View GitHub Profile
@guddukhan1987
guddukhan1987 / Jenkinsfile
Created December 28, 2020 11:21 — forked from gazoakley/Jenkinsfile
Jenkinsfile for running Terraform
pipeline {
agent any
parameters {
string(name: 'environment', defaultValue: 'default', description: 'Workspace/environment file to use for deployment')
string(name: 'version', defaultValue: '', description: 'Version variable to pass to Terraform')
booleanParam(name: 'autoApprove', defaultValue: false, description: 'Automatically run apply after generating plan?')
}
environment {
@guddukhan1987
guddukhan1987 / Dockerfile
Created October 8, 2020 12:41 — forked from nicosingh/Dockerfile
pg_auto_failover sample cluster
FROM centos:7
RUN curl https://install.citusdata.com/community/rpm.sh --output rpm.sh && \
chmod +x rpm.sh && \
bash rpm.sh && \
rm -f rpm.sh
RUN yum install -y \
pg-auto-failover10_11\
postgresql11-contrib \
@guddukhan1987
guddukhan1987 / importcert.sh
Created January 30, 2019 05:02 — forked from wbroek/importcert.sh
Convert cert key to bks for Android SSL Pinning
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "Usage: importcert.sh <CA cert PEM file> <bouncy castle jar> <keystore pass>"
exit 1
fi
CACERT=$1
BCJAR=$2
SECRET=$3
@guddukhan1987
guddukhan1987 / ALEXA.md
Created October 16, 2018 11:20 — forked from mdang/ALEXA.md
Lesson: Alexa
@guddukhan1987
guddukhan1987 / nginx.conf
Created November 22, 2017 06:29 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@guddukhan1987
guddukhan1987 / install-comodo-ssl-cert-for-nginx.rst
Created November 21, 2017 14:01 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@guddukhan1987
guddukhan1987 / LICENSE
Created June 12, 2017 11:28 — forked from shevron/LICENSE
Send EC2 instance memory usage stats to CloudWatch using boto and IAM Roles
Copyright (c) 2015, Shahar Evron
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@guddukhan1987
guddukhan1987 / monitrc
Created February 7, 2017 12:29 — forked from franck/monitrc
monit config file (nginx, mysql, redis, tomcat)
###############################################################################
## Monit control file
###############################################################################
##
## Comments begin with a '#' and extend through the end of the line. Keywords
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
##
## Below you will find examples of some frequently used statements. For
## information about the control file, a complete list of statements and
## options please have a look in the monit manual.
@guddukhan1987
guddukhan1987 / lambdaAMICleanup.py
Created November 16, 2016 11:48 — forked from bkozora/lambdaAMICleanup.py
AWS Lambda Function to Delete AMIs and Snapshots
# Automated AMI and Snapshot Deletion
#
# @author Robert Kozora <[email protected]>
#
# This script will search for all instances having a tag with "Backup" or "backup"
# on it. As soon as we have the instances list, we loop through each instance
# and reference the AMIs of that instance. We check that the latest daily backup
# succeeded then we store every image that's reached its DeleteOn tag's date for
# deletion. We then loop through the AMIs, deregister them and remove all the
# snapshots associated with that AMI.
@guddukhan1987
guddukhan1987 / lambdaAMIBackups.py
Created November 16, 2016 11:47 — forked from bkozora/lambdaAMIBackups.py
AWS Lambda AMI Backups
# Automated AMI Backups
#
# @author Robert Kozora <[email protected]>
#
# This script will search for all instances having a tag with "Backup" or "backup"
# on it. As soon as we have the instances list, we loop through each instance
# and create an AMI of it. Also, it will look for a "Retention" tag key which
# will be used as a retention policy number in days. If there is no tag with
# that name, it will use a 7 days default value for each AMI.
#