Skip to content

Instantly share code, notes, and snippets.

View nikhita's full-sized avatar
E_TOO_MANY_THINGS

Nikhita Raghunath nikhita

E_TOO_MANY_THINGS
View GitHub Profile
@nikhita
nikhita / open-source-beginner.md
Created December 2, 2015 14:24 — forked from nicknisi/open-source-beginner.md
A collection of JavaScript projects with issues labeled beginner-friendly
@nikhita
nikhita / c++Template-Codejam.cpp
Created March 11, 2016 13:41 — forked from kodekracker/c++Template-Codejam.cpp
Basic C++ Template for Google Code Jam or File I/O Competitive Programming
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template-Codejam.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/
@nikhita
nikhita / tpr-watch-example.md
Last active May 26, 2017 11:03
Kubernetes TPR watch example

Keybase proof

I hereby claim:

  • I am nikhita on github.
  • I am nikhita (https://keybase.io/nikhita) on keybase.
  • I have a public key ASBiFn0btDxvOOjNeEr2R3c_TL5hRFmzYgz-JQJ3gccd9go

To claim this, I am signing this object:

@nikhita
nikhita / install-firacode.sh
Created April 24, 2017 17:32
How to install FiraCode font on Linux
mkdir -p ~/.local/share/fonts
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done
fc-cache -f
@nikhita
nikhita / command-time.sh
Created April 24, 2017 18:38
A script to show how long a command took to run. Outputs the time on the right.
function preexec() {
timer=${timer:-$SECONDS}
}
function precmd() {
if [ $timer ]; then
timer_show=$(($SECONDS - $timer))
export RPROMPT="%F{cyan}${timer_show}s %{$reset_color%}"
unset timer
fi
@nikhita
nikhita / benchmarks.md
Last active May 26, 2017 11:02
Benchmarks for go json schema libraries (validation). Using the standard json schema libraries.

Benchmarks

BenchmarkOpenAPI-4        	    5000	    240116 ns/op	   71790 B/op	     649 allocs/op
BenchmarkGoJSONSchema-4   	    5000	    314191 ns/op	   66629 B/op	     965 allocs/op
@nikhita
nikhita / update-golang.md
Last active April 27, 2024 13:09
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

E0525 14:11:00.846457 8170 runtime.go:66] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/home/nikhita/gocode/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:72
/home/nikhita/gocode/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/home/nikhita/gocode/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/usr/local/go/src/runtime/asm_amd64.s:514
/usr/local/go/src/runtime/panic.go:489
/usr/local/go/src/runtime/panic.go:63
/usr/local/go/src/runtime/signal_unix.go:290
/home/nikhita/gocode/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/kube-apiextensions-server/pkg/controller/finalizer/crd_finalizer.go:134
/home/nikhita/gocode/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k
@nikhita
nikhita / README.md
Created June 19, 2017 19:00 — forked from robertpainsi/README.md
How to reopen a pull-request after a force-push?

You need the rights to reopen pull requests on the repository.

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin <GITHUB-HASH-FROM-STEP-2>:<PR-BRANCH>
  4. Reopen the PR.
  5. git push -f origin <HASH-FROM-STEP-1>:<PR-BRANCH>

Example

You've a PR branch my-feature currently at 1234567. Looking at the the PRs page, we see that the PR was closed when my-feature pointed at 0abcdef.