Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
## This script is for sync chart packages between chartmuseum chart repositories
# preq - Helm v3 & Helm Push plugin
# $ helm plugin install https://github.com/chartmuseum/helm-push.git
# safety options turned on
set -eou pipefail
@anirvanr
anirvanr / kafka.md
Created March 3, 2020 10:06 — forked from ashrithr/kafka.md
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
@anirvanr
anirvanr / git_new_local_branch.md
Created August 22, 2019 09:20 — forked from nanusdad/git_new_local_branch.md
Git - create new local branch push to GitHub
@anirvanr
anirvanr / mongodb-s3-backup.sh
Created March 29, 2019 15:55 — 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
# Terraform template to have VPC flow logs be sent to AWS Lambda
provider "aws" {
region = "us-east-1"
}
resource "aws_cloudwatch_log_group" "vpc_flow_log_group" {
name = "vpc-flow-log-group"
retention_in_days = 1
}
@anirvanr
anirvanr / ca.md
Created December 13, 2018 04:55 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@anirvanr
anirvanr / update-route53.sh
Created June 6, 2018 04:13 — forked from phybros/update-route53.sh
BASH Script to keep Route53 updated with your current external IP address
#!/bin/bash
# (optional) You might need to set your PATH variable at the top here
# depending on how you run this script
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Hosted Zone ID e.g. BJBK35SKMM9OE
ZONEID="enter zone id here"
# The CNAME you want to update e.g. hello.example.com