Skip to content

Instantly share code, notes, and snippets.

View varunchandak's full-sized avatar
🏠
Working from home

Varun Chandak varunchandak

🏠
Working from home
View GitHub Profile
@varunchandak
varunchandak / 99-mind-fuck-movies.md
Created March 27, 2021 14:01
99 Mind Fuck Movies
  • 1984
  • 12 MONKEYS
  • 2001 A SPACE ODYSSEY
  • A BEAUTIFUL MIND
  • A CLOCKWORK ORANGE
  • A TALE OF TWO SISTERS
  • ADAPTATION
  • AMERICAN PSYCHO
  • ANNIHILATION
  • ANTICHRIST
@varunchandak
varunchandak / minimal_user.sh
Created March 8, 2020 16:25
Create minimal user on Ubuntu Machine
#!/bin/bash
# The below is run as root user (or sudo user) and tested on Ubuntu Machine
export USER_NAME="<ENTER USER NAME HERE>"
# Create a User with restricted bash shell
useradd -s /bin/rbash -m "$USER_NAME"
mkdir /home/"$USER_NAME"/.ssh/
cd /home/"$USER_NAME"/
# Copy the pubkeys here and change permissions
cat "<AUTH_KEYS>" >> .ssh/authorized_keys
@varunchandak
varunchandak / report_public_ip.sh
Created February 18, 2020 11:10
Get Instance Public IP on Email on new instance launch.
#!/bin/bash
export AWS_ACCOUNT_ID="<ENTER_ACCOUNT_ID>"
export AWS_DEFAULT_REGION="ap-south-1"
SNS_ARN="arn:aws:sns:ap-south-1:$AWS_ACCOUNT_ID:GetPublicIP"
PUBIPADDRESS="$(curl -s icanhazip.com)"
INST_NAME="$(aws ec2 describe-instances --filters Name=ip-address,Values="$PUBIPADDRESS" --query 'Reservations[*].Instances[*].Tags[?Key==`Name`].Value')"
aws sns publish \
@varunchandak
varunchandak / iam_authentication_for_rds.md
Created May 1, 2019 04:54
IAM Authentication for RDS

RDS Authentication via IAM User/Role

  1. Enable IAM Authentication in existing RDS using the link here: Enabling and Disabling IAM Database Authentication

  2. Login to RDS with master username password.

    mysql -h <RDS_ENDPOINT> --user <MASTER_USERNAME> --password
@varunchandak
varunchandak / devops_training.txt
Created May 15, 2017 12:07 — forked from ssmythe/devops_training.txt
Training materials for DevOps
======
Videos
======
DevOps
What is DevOps? by Rackspace - Really great introduction to DevOps
https://www.youtube.com/watch?v=_I94-tJlovg
Sanjeev Sharma series on DevOps (great repetition to really get the DevOps concept)