Skip to content

Instantly share code, notes, and snippets.

View Laxman-SM's full-sized avatar

Laxman Singh Laxman-SM

  • Ex-Phenome, Ex-Intertrust, Ex-Wipro
  • US, Hyderabad (india)
View GitHub Profile
@Laxman-SM
Laxman-SM / setup_aks_cilium.sh
Created November 15, 2022 06:08 — forked from rgpower/setup_aks_cilium.sh
Setup cilium on Azure AKS using user-assigned managed identity
#!/usr/bin/env bash
set -euo pipefail
AZURE_RESOURCE_GROUP=$1
CLUSTER_NAME=$2
LOCATION=$3
AZURE_NODEGROUP=$(az aks show -n ${CLUSTER_NAME} -g ${AZURE_RESOURCE_GROUP} -o tsv --query nodeResourceGroup)
@Laxman-SM
Laxman-SM / nginx.conf
Last active July 15, 2022 09:21
nginx.conf reverse proxy
user www-data;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 65535;
events { worker_connections 10000; }
http {
map $http_upgrade $connection_upgrade {
default upgrade;
‘’ close;
@Laxman-SM
Laxman-SM / teams-to-workspaces.tf
Created June 21, 2022 04:23 — forked from phinze/teams-to-workspaces.tf
An example of how you could map teams to many workspaces using the Terraform Enterprise provider
# Start w/ a data source to get a list of all the workspaces
# See: https://www.terraform.io/docs/providers/tfe/d/workspace_ids.html
data "tfe_workspace_ids" "all-workspaces" {
names = ["*"]
organization = "my-org-name"
}
# Look up the ID of the teamn you're looking to map
# See: https://www.terraform.io/docs/providers/tfe/d/team.html
data "tfe_team" "architects" {
@Laxman-SM
Laxman-SM / .gitignore
Created June 20, 2022 14:31 — forked from isaacarnault/.gitignore
AWS VPC using Terraform and Jenkins integration
________ ________ ___ __ ___
|\_____ \|\ __ \|\ \|\ \ |\ \
\|___/ /\ \ \|\ \ \ \/ /|\ \ \
/ / /\ \ __ \ \ ___ \ \ \
/ /_/__\ \ \ \ \ \ \\ \ \ \ \
|\________\ \__\ \__\ \__\\ \__\ \__\
\|_______|\|__|\|__|\|__| \|__|\|__|
ignore Azure, GCP
@Laxman-SM
Laxman-SM / measure.sh
Created June 17, 2022 04:43 — forked from njam/measure.sh
Measure bandwidth with tcpstat + gnuplot
# Measure traffic with tcpstat
tcpstat -i em1 -o "%r\t%b\n" -s 30 0.1 > traffic.txt
# Create plot using the below script
gnuplot traffic.script > traffic.png
# Display plot
qlmanage -p 2>/dev/null traffic.png
@Laxman-SM
Laxman-SM / mount-volume.sh
Created June 16, 2022 03:47 — forked from crestonbunch/mount-volume.sh
EC2 Mount EBS Volume
#!/bin/bash
set -e
REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/region)
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
VOLUME_NAME=$1
VOLUME_DEVICE=$2
VOLUME_ID=$(aws ec2 describe-volumes --filters "Name=tag:Name,Values=${VOLUME_NAME}" --region "${REGION}" | jq -r .Volumes[0].VolumeId)
@Laxman-SM
Laxman-SM / README.md
Created April 1, 2022 19:27 — forked from takemikami/README.md
terraform for mwaa
@Laxman-SM
Laxman-SM / helmify-kustomize
Created April 1, 2022 04:03 — forked from mumoshu/helmify-kustomize
Run `helmify-kustomize build $chart $env` in order to generate a local helm chart at `$chart/`, from kustomize overlay at `${chart}-kustomize/overlays/$env`
#!/usr/bin/env bash
cmd=$1
chart=$2
env=$3
dir=${chart}-kustomize
chart=${chart/.\//}
build() {
#!/usr/bin/env bash
set -e
if eksctl get cluster -f $FILE >/dev/null 2>&1; then
# See https://github.com/weaveworks/eksctl/blob/33ec1ed967c1ad03c985bf18774ea970d85c86f1/site/content/usage/03-cluster-upgrade.md#L41
eksctl update cluster -f $FILE
eksctl utils update-kube-proxy
eksctl utils update-aws-node
eksctl utils update-coredns
@Laxman-SM
Laxman-SM / tmux.md
Created January 5, 2022 20:04 — forked from larribas/tmux.md
Tmux Cheat Sheet

Tmux Cheat Sheet

Sessions

Start a new session tmux || tmux new -s name || :new

Attach to last session tmux a || tmux a -t name