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 / minikube-upgrade.md
Created February 12, 2020 17:22
How to upgrade minikube to the latest version in Linux.

Find the current version

$ minikube version
minikube version: v1.7.1

Check if there are newer versions available

@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:

@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
@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 / fedora-firefox-gif-video.md
Created August 6, 2018 05:17
How to get Twitter gifs and short videos working on Firefox on Fedora

How to get Twitter gifs and short videos working on Firefox on Fedora

Note: This is for Fedora 28, however the process should be similar for other recent Fedora versions as well.

  1. Go to https://www.youtube.com/html5 and check if all boxes are checked. If gifs or short videos don't work for you, you mostly do not have H.264 and MSE & H.264.

  2. There are a bunch of repositories you need to setup.

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

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 / 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)
@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.

@nikhita
nikhita / check-broken-k8s-links.md
Created September 21, 2018 14:01 — forked from jonasrosland/check-broken-k8s-links.md
Check broken links in Kubernetes Community repo
recursive-delete-patterns:
- BUILD
- "*/BUILD"
- BUILD.bazel
- "*/BUILD.bazel"
- Gopkg.toml
rules:
- destination: apimachinery
library: true