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 / iptables_color.txt
Created August 8, 2018 07:29 — forked from nega0/iptables_color.txt
colorize your `iptables` output
## based on the blogpost here: http://blog.sjas.de/posts/colored-iptables-output.html
iptables --line-numbers -vnL |\
sed -E 's/^Chain.*$/\x1b[4m&\x1b[0m/' |\
sed -E 's/^num.*/\x1b[33m&\x1b[0m/' |\
sed -E '/([^y] )((REJECT|DROP))/s//\1\x1b[31m\3\x1b[0m/' |\
sed -E '/([^y] )(ACCEPT)/s//\1\x1b[32m\2\x1b[0m/' |\
sed -E '/([ds]pt[s]?:)([[:digit:]]+(:[[:digit:]]+)?)/s//\1\x1b[33;1m\2\x1b[0m/' |\
sed -E '/([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}(\/([[:digit:]]){1,3}){0,1}/s//\x1b[36;1m&\x1b[0m/g' |\
sed -E '/([^n] )(LOGDROP)/s//\1\x1b[33;1m\2\x1b[0m/'|\
@indradhanush
indradhanush / jessfraz.md
Created July 30, 2018 12:27 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
@indradhanush
indradhanush / install-kubectl.sh
Created April 20, 2018 10:14 — forked from wellsie/install-kubectl.sh
Install kubectl (amd64)
#!/bin/bash -eux
ARCH=${ARCH:-linux}
K8S_VER=${K8S_URL:-v1.1.8}
K8S_URL=https://storage.googleapis.com/kubernetes-release/release
curl -Lo /usr/local/bin/kubectl ${K8S_URL}/${K8S_VER}/bin/$ARCH/amd64/kubectl
chmod +x /usr/local/bin/kubectl
@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
@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

// -*- 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 / 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"
)
@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 / 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 / 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