Skip to content

Instantly share code, notes, and snippets.

Avatar
🚫
I may be slow to respond.

Nikhita Raghunath nikhita

🚫
I may be slow to respond.
View GitHub Profile
@nikhita
nikhita / open-source-beginner.md
Created Dec 2, 2015 — forked from nicknisi/open-source-beginner.md
A collection of JavaScript projects with issues labeled beginner-friendly
View open-source-beginner.md
@nikhita
nikhita / c++Template-Codejam.cpp
Created Mar 11, 2016 — forked from kodekracker/c++Template-Codejam.cpp
Basic C++ Template for Google Code Jam or File I/O Competitive Programming
View c++Template-Codejam.cpp
/*
* 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
Kubernetes TPR watch example
View tpr-watch-example.md
View keybase.md

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 Apr 24, 2017
How to install FiraCode font on Linux
View install-firacode.sh
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 Apr 24, 2017
A script to show how long a command took to run. Outputs the time on the right.
View command-time.sh
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
Benchmarks for go json schema libraries (validation). Using the standard json schema libraries.
View benchmarks.md

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 May 16, 2022
How to update the Go version
View update-golang.md

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:

View panic.log
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 Jun 19, 2017 — forked from robertpainsi/README.md
How to reopen a pull-request after a force-push?
View README.md

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.