Skip to content

Instantly share code, notes, and snippets.

View nemani's full-sized avatar
🤷‍♂️
Vibin'

Arjun Nemani nemani

🤷‍♂️
Vibin'
View GitHub Profile
@nemani
nemani / install_terragrunt.sh
Created August 31, 2020 07:53
Bash script to install Terraform and Terragrunt
#!/bin/bash
function terraform-install() {
[[ -f ${HOME}/bin/terraform ]] && echo "`${HOME}/bin/terraform version` already installed at ${HOME}/bin/terraform" && return 0
LATEST_URL=$(curl -sL https://releases.hashicorp.com/terraform/index.json | jq -r '.versions[].builds[].url' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | egrep -v 'rc|beta' | egrep 'linux.*amd64' |tail -1)
curl ${LATEST_URL} > /tmp/terraform.zip
mkdir -p ${HOME}/bin
(cd ${HOME}/bin && unzip /tmp/terraform.zip)

Keybase proof

I hereby claim:

  • I am nemani on github.
  • I am nemaniarjun (https://keybase.io/nemaniarjun) on keybase.
  • I have a public key ASCRA8QxSg5N38_KOJEbNfCZpKbgu4EUZvX8Q3_QnhKb2Qo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am nemaniarjun on github.

  • I am nemaniarjun (https://keybase.io/nemaniarjun) on keybase.

  • I have a public key ASCRA8QxSg5N38_KOJEbNfCZpKbgu4EUZvX8Q3_QnhKb2Qo

@nemani
nemani / admission_script.py
Last active January 6, 2019 03:58
IIIT: Admission Script / Create GAM user from email LDAP / Migration files
import os
import re
import ldap
import sys
import random
import string
import subprocess
import logging
def run_command_no_output(command):
@nemani
nemani / download_all_lambda_functions.sh
Last active October 10, 2024 08:43
Download All Lambda Functions
# Parallelly download all aws-lambda functions
# Assumes you have ran `aws configure` and have output-mode as "text"
# Works with "aws-cli/1.16.72 Python/3.6.7 Linux/4.15.0-42-generic botocore/1.12.62"
download_code () {
local OUTPUT=$1
aws lambda get-function --function-name $OUTPUT --query 'Code.Location' | xargs wget -O ./lambda_functions/$OUTPUT.zip
}
mkdir -p lambda_functions
@nemani
nemani / index.html
Created November 9, 2017 22:11
Lightning
<canvas id='c'></canvas>
name = str(raw_input())
age = int(raw_input())
print name + " will turn 100 in year " + str(2115-age)