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

Kubernetes API Internals Codebase Walkthrough

The JSON file included in this gist gives a codebase walkthrough of the resource handling in the k8s apiserver.

The codebase walkthrough is created using CodeTour VS Code extension. To display the walkthrough in VS Code, use the JSON file using the Opening Tours functionality.

You might need to first open the workspace at the apiserver directory.

@nikhita
nikhita / list-all-repos.sh
Created February 10, 2021 06:04
Generate a list of all repos in a GitHub to paste into Excel
#!/usr/bin/env bash
# This script generates a list of repos in a GitHub org.
# The list can be pasted directly to a Microsoft Excel sheet.
# You will need to use your GitHub username in the username field.
# Update the page=N number to get the complete list of repos.
curl --silent --user "username" "https://api.github.com/orgs/vmware/repos?page=1&per_page=100" | npx jq '.[].html_url' | while read repo
do
echo "=Hyperlink("$repo","$repo")"
done
recursive-delete-patterns:
- BUILD
- "*/BUILD"
- BUILD.bazel
- "*/BUILD.bazel"
- Gopkg.toml
rules:
- destination: apimachinery
library: true
recursive-delete-patterns:
- BUILD
- "*/BUILD"
- BUILD.bazel
- "*/BUILD.bazel"
- Gopkg.toml
default-go-version: 1.14.5
rules:
- destination: code-generator
branches:
recursive-delete-patterns:
- BUILD
- "*/BUILD"
- BUILD.bazel
- "*/BUILD.bazel"
- Gopkg.toml
rules:
- destination: code-generator
branches:
- source:
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -392,12 +399,15 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ
recursive-delete-patterns:
- BUILD
- "*/BUILD"
- BUILD.bazel
- "*/BUILD.bazel"
- Gopkg.toml
rules:
- destination: code-generator
branches:
- source:
recursive-delete-patterns:
- BUILD
- "*/BUILD"
- BUILD.bazel
- "*/BUILD.bazel"
- Gopkg.toml
rules:
- destination: apimachinery
library: true
branches:
recursive-delete-patterns:
- BUILD
- "*/BUILD"
- BUILD.bazel
- "*/BUILD.bazel"
- Gopkg.toml
rules:
- destination: apimachinery
library: true
branches:
@nikhita
nikhita / gtk-protocol-linux.md
Created April 26, 2020 15:41
gtk: "No protocol specified" error on Linux as root user

GTK protocol error

Problem

If you are running as a root user while opening a GTK session on Linux i.e. using sudo, su, etc, you might encounter errors like:

No protocol specified
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
 warnings.warn(str(e), _gtk.Warning)