Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View aloknnikhil's full-sized avatar
🌋

Alok Nikhil aloknnikhil

🌋
View GitHub Profile
@aloknnikhil
aloknnikhil / README.md
Created March 4, 2023 20:43 — forked from paolocarrasco/README.md
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@aloknnikhil
aloknnikhil / loadnvm.sh
Created April 10, 2020 16:42
FastLoad NVM on ZSH startup
#!/bin/zsh
# ~/loadnvm.sh
#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
aloknnikhil / uds_test.go
Created February 10, 2020 21:58
UDS throughput benchmark (Golang)
package test
import (
"fmt"
"net"
"os"
"testing"
"time"
)
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":"0.0.0.0:8383"}
@aloknnikhil
aloknnikhil / 1-setup.md
Created October 24, 2019 10:19 — forked from troyfontaine/1-setup.md
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 krypt.co

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 Krypt.co.

Keybase proof

I hereby claim:

  • I am aloknnikhil on github.
  • I am aloknnikhil (https://keybase.io/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
aloknnikhil / caching.ex
Created February 2, 2019 00:32 — forked from sb8244/caching.ex
Local/Distributed Caching
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