Skip to content

Instantly share code, notes, and snippets.

View indradhanush's full-sized avatar
Out playing

Indradhanush Gupta indradhanush

Out playing
View GitHub Profile
@indradhanush
indradhanush / latency.txt
Created March 13, 2017 04:24 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@indradhanush
indradhanush / codesign_gdb.md
Created June 21, 2017 20:29 — forked from hlissner/codesign_gdb.md
Codesign gdb on OSX

If you are getting this in gdb on OSX while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)

Keybase proof

I hereby claim:

  • I am indradhanush on github.
  • I am indradhanush (https://keybase.io/indradhanush) on keybase.
  • I have a public key ASCrADGNepl1q3bvGdu8se73WTMMBaxddyPS8Ej7nJ-9EQo

To claim this, I am signing this object:

@indradhanush
indradhanush / checkboxes.md
Created November 13, 2017 11:24 — forked from germanny/checkboxes.md
Markdown checkboxes
  • checkbox is done with the two brackets next to the P key
  • checkbox is done with the two brackets next to the P key
  • checkbox is done with the two brackets next to the P key
  • checkbox is done with the two brackets next to the P key
@indradhanush
indradhanush / tmux-cheatsheet.markdown
Created January 2, 2018 08:47 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@indradhanush
indradhanush / habitat-osb-hack.yml
Last active April 10, 2018 14:26
Kubernetes manifest for the habitat service broker
apiVersion: v1
kind: ServiceAccount
metadata:
name: habitat-broker
namespace: habitat-broker
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: habitat-broker
@indradhanush
indradhanush / osb-yaml.go
Created April 3, 2018 05:34
Test unmarshalling OSB spec
package main
import (
"fmt"
"os"
// osb "github.com/pmorie/go-open-service-broker-client/v2"
"github.com/pmorie/osb-broker-lib/pkg/broker"
"gopkg.in/yaml.v2"
)
// -*- mode:go;mode:go-playground -*-
// snippet of code @ 2018-04-06 15:35:29
// === Go Playground ===
// Execute the snippet with Ctl-Return
// Remove the snippet completely with its dir and all files M-x `go-playground-rm`
package main
import (
@indradhanush
indradhanush / Instructions.md
Last active April 16, 2018 08:58
Test instructions for reproducing RBAC error

Error

Error: release habitat-service-broker failed: clusterroles.rbac.authorization.k8s.io "habitat-service-broker-habitat-service-broker" already exists
make: *** [Makefile:35: deploy-helm] Error 1

Steps to reproduce

Minkube version: 0.25.0

@indradhanush
indradhanush / errors.txt
Created April 18, 2018 12:46
dep ensure errors
$ dep ensure
Solving failure: No versions of github.com/habitat-sh/habitat-operator met constraints:
v0.5.1: Could not introduce github.com/habitat-sh/habitat-operator@v0.5.1, as it has a dependency on k8s.io/api with constraint kubernetes-1.9.0, which has no overlap with existing constraint kubernetes-1.9.1 from github.com/kubernetes-incubator/service-catalog@v0.1.14
v0.5.0: Could not introduce github.com/habitat-sh/habitat-operator@v0.5.0, as it has a dependency on k8s.io/api with constraint kubernetes-1.9.0, which has no overlap with existing constraint kubernetes-1.9.1 from github.com/kubernetes-incubator/service-catalog@v0.1.14
v0.4.0: Could not introduce github.com/habitat-sh/habitat-operator@v0.4.0, as its subpackage github.com/habitat-sh/habitat-operator/pkg/apis/habitat/v1beta1 is missing. (Package is required by (root).)
v0.3.0: Could not introduce github.com/habitat-sh/habitat-operator@v0.3.0 due to multiple problematic subpackages:
Subpackage github.com/habitat-sh/habitat-operator/pkg/apis/ha