Skip to content

Instantly share code, notes, and snippets.

View dims's full-sized avatar

Davanum Srinivas dims

View GitHub Profile
@dims
dims / skip-job.sh
Created February 6, 2025 11:55
Script to skip certain jobs in a PR
#!/usr/bin/env bash
# Default repository and job name
REPO="google/cadvisor"
JOB_NAME="pull-cadvisor-e2e"
# Function to display usage
usage() {
echo "Usage: $0 -p <PR_NUMBER> [-j <JOB_NAME>] [-s <SHA>] [-r <REPOSITORY>]"
echo "Example: $0 -p 3615"
@dims
dims / README.md
Last active February 1, 2025 03:06
Deploy deepseek-ai distill models

Notes

Deploy using kubectl apply -f deepseek.yaml and watch the logs on the pod. When you see vllm listening on port 8000, use port forward so you can try running python query.py

kubectl port-forward svc/deepseek-r1-server 8000:8000

Links

@dims
dims / README.md
Created January 14, 2025 15:13
Using pprof to find memory leaks for golang binaries
  1. run the main.go using go run main.go
  2. find the pid of the process and send a USR1 signal using kill -USR1 pid-of-main
  3. the heap_profile.pprof will be generated in the directory the main process was running
  4. run go tool pprof -http=:8081 heap_profile.pprof to visualize the heap
@dims
dims / features.md
Last active January 26, 2025 10:58
`Feature Gates in Kubernetes master branch on Jan 11, 2025`
@dims
dims / eks-add-on-to-k8s-version.sh
Created January 8, 2025 17:08
EKS add-on version to Kubernetes version matrix
#!/bin/bash
aws eks describe-addon-versions | jq -r '.addons[] |
{
addon: .addonName,
versions: [
.addonVersions[] | {
version: .addonVersion,
kubernetes_versions: [
.compatibilities[].clusterVersion
@dims
dims / unfollow.js
Created November 15, 2024 16:04 — forked from ntfargo/unfollow.js
BlueSky | Unfollow All
/*
You need create .env file with the following variables:
BSKYHANDLE=yourhandle
BSKYPASS=yourpass
*/
const {
BskyAgent
} = require('@atproto/api');
require('dotenv').config();
cat <<EOF | curl --location 'https://bsky.social/xrpc/com.atproto.server.createSession' --header 'Content-Type: application/json' -d @- | jq
{
  "identifier": "dims.dev",
  "password": "$BSKY_PASSWORD"
}
EOF

WORKS!
go test -c -race ./pkg/kubelet/
stress ./kubelet.test -test.run=TestUpdateNodeStatusWithLease
@dims
dims / get-tag
Last active November 4, 2024 20:19
#!/bin/bash
set -xeu
TAG=${1#dims:}
git fetch --all --tags
git checkout tags/$TAG -b branch-for-tag-$TAG

Install cedar CLI binary

brew install rustup
rustup update
cargo install cedar-policy-cli

Install kind

go install sigs.k8s.io/[email protected]