Skip to content

Instantly share code, notes, and snippets.

View arunvelsriram's full-sized avatar
🇮🇳
👨‍💻 from 🏠

Arunvel Sriram arunvelsriram

🇮🇳
👨‍💻 from 🏠
View GitHub Profile
@arunvelsriram
arunvelsriram / webpack.config.js
Last active May 15, 2017 16:05 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var debug = process.env.NODE_ENV !== 'production';
var plugins = [
new HtmlWebpackPlugin()
];
module.exports = {
context: __dirname + '/src',
@arunvelsriram
arunvelsriram / raspberrypi_kali_linux.md
Last active November 16, 2017 18:17
Using TL-WN722N USB wireless adapter (TP-Link) in Kali Linux installed on RaspberryPi

Using TL-WN722N USB wireless adapter (TP-Link) in Kali Linux installed on RaspberryPi

apt-get update
apt-get upgrade
apt-get install firmware-atheros
@arunvelsriram
arunvelsriram / osmc_raspberrypi.md
Last active November 17, 2017 18:59
OSMC on RaspberryPi 3

Keybase proof

I hereby claim:

  • I am arunvelsriram on github.
  • I am arunvelsriram (https://keybase.io/arunvelsriram) on keybase.
  • I have a public key whose fingerprint is 603A 233B FD61 6CF4 9B19 0768 BAAE F633 460D 68C2

To claim this, I am signing this object:

@arunvelsriram
arunvelsriram / dashboards.sh
Last active March 6, 2019 06:36
Fuzzy search over Grafana dashboards (filtered by tag) and open them from the command-line
#!/usr/bin/env bash
## Tested on Grafana v5.1.3
function dashboards {
base_url="<BASE-URL>"
dashboards=$(curl -s -H "Authorization: Bearer <TOKEN>" \
$base_url/api/search?query=\&tag=<TAG> \
| jq -r '.[]')
titles=$(echo $dashboards | jq -r '.title' | fzf --height 10 --reverse --multi)
[ -z "$titles" ] && return
@arunvelsriram
arunvelsriram / di_terraform.tf
Created August 21, 2017 21:23
Terraform dependency injection style de-coupling resources
# di_terraform.tf
# Example Terraform configuration that shows de-coupling resources (Amazon S3 bucket and bucket policy)
# with the help of modules analogous to dependency injection technique
# modules/s3_bucket/main.tf
# Base S3 bucket that can be attached a policy
variable "bucket_name" {}
variable "region" {
@arunvelsriram
arunvelsriram / editing-state.md
Last active October 25, 2019 14:42
Terraform

Editing Terraform State

  1. Pull the state
terraform state pull > temp.tfstate
  1. Edit temp.tfstate in your favourite editor

  2. Push the state

@arunvelsriram
arunvelsriram / my-vim-cheatsheet.md
Last active January 9, 2021 11:33
My VIM cheatsheet
  • Ctrl + O / Ctrl + I - Navigate to next / previous cursor position
  • gd - goto definition
  • Ctrl + d - Move down 1/2 screen
  • Ctrl + u - Move up 1/2 screen
  • "*y - Copy to system clipboard
  • "*p - Pasting from system clipboard
  • :redir @* | set guifont | redir END - Copy output of command to clipboard. @* is clipboard register
@arunvelsriram
arunvelsriram / anvim.sh
Last active December 16, 2021 22:07
Bash function for opening NeovIm in a separte Alacritty window providing GUI like feel. Actually a TUI (Terminal UI).
# USAGE:
# anvim [path]
anvim() {
local target="${PWD}"
if [ -n "${1}" ]; then
target=$(realpath "$1")
fi
local wdir="${target}"
@arunvelsriram
arunvelsriram / aerospike-rest-gateway.md
Last active February 15, 2023 19:30
Aerospike Rest Gateway