Skip to content

Instantly share code, notes, and snippets.


Alok Nikhil aloknnikhil

View GitHub Profile
aloknnikhil /
Created Apr 10, 2020
FastLoad NVM on ZSH startup
# ~/
#delete the aliases
unalias nvm
unalias npm
unalias node
#(this is the loader code nvm put in my .bashrc)
export NVM_DIR="$HOME/.nvm"
aloknnikhil / uds_test.go
Created Feb 10, 2020
UDS throughput benchmark (Golang)
View uds_test.go
package test
import (
INFO[0000] Running the operator locally.                
INFO[0000] Using namespace default.                     
{"level":"info","ts":1580766525.451211,"logger":"cmd","msg":"Operator Version: 0.0.1"}
{"level":"info","ts":1580766525.451234,"logger":"cmd","msg":"Go Version: go1.13.4"}
{"level":"info","ts":1580766525.4512398,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1580766525.451245,"logger":"cmd","msg":"Version of operator-sdk: v0.13.0+git"}
{"level":"info","ts":1580766525.4520059,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1580766525.4520166,"logger":"leader","msg":"Skipping leader election; not running in a cluster."}
{"level":"info","ts":1580766525.7552295,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":""}
aloknnikhil /
Created Oct 24, 2019 — forked from troyfontaine/
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or


Keybase proof

I hereby claim:

  • I am aloknnikhil on github.
  • I am aloknnikhil ( on keybase.
  • I have a public key whose fingerprint is DA88 D486 65B6 35CB 156E 693E 64F6 1524 BE77 3853

To claim this, I am signing this object:

aloknnikhil / caching.ex
Created Feb 2, 2019 — forked from sb8244/caching.ex
Local/Distributed Caching
View caching.ex
defmodule MyApp.AccountLookup.Cache do
@moduledoc """
Provides a cache that can be used for account lookups. This cache is backed by
Cachex for local storage and pg2 for remote distribution. Keys are set to expire
after 7-10 days (randomly distributed) in order to prevent stale data in our cache
over a long time period.
use Cachex.DistributedCache