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 / 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 / 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 / How-to-Win-Friends-and-Influence-People.md
Created December 3, 2018 13:37 — forked from justincampbell/How-to-Win-Friends-and-Influence-People.md
Principles of How to Win Friends and Influence People

How to Win Friends and Influence People

Fundamental Techniques in Handling People

  1. Don't criticize, condemn, or complain.
  2. Give honest and sincere appreciation.
  3. Arouse in the other person an eager want.
  4. Never show others that you are not interested in what they have to say.
@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 / main.go
Created August 11, 2020 14:38
Simple logging middleware using logrus for HTTP server provided by GoLang's net/http
package main
import (
"fmt"
"net/http"
"time"
"github.com/sirupsen/logrus"
)