Skip to content

Instantly share code, notes, and snippets.

View muhammad-asn's full-sized avatar
🎯
Focusing

Nuga muhammad-asn

🎯
Focusing
View GitHub Profile
@muhammad-asn
muhammad-asn / script.sh
Created August 14, 2025 06:12
Check and list bitnami in kubernetes
kubectl get pods --all-namespaces -o jsonpath="{..image}" | tr -s '[[:space:]]' '\n' | sort -u | grep -i bitnami
@muhammad-asn
muhammad-asn / readme.md
Last active July 2, 2025 06:02
Check Timeout Related Configuration PostgreSQL (TimescaleDB)
  1. Check TimescaleDB/Postgres Config in Kubernetes

    kubectl exec -it <pod-name> -- psql -U <username> -d <database>
  2. Run this

    SHOW statement_timeout;
@muhammad-asn
muhammad-asn / file.txt
Created June 24, 2025 06:42
Code & Coffee
Good reading: https://medium.com/code-and-coffee
@muhammad-asn
muhammad-asn / file.md
Last active May 28, 2025 09:08
Observe Java Heap by PID
@muhammad-asn
muhammad-asn / gist:4889bf6503bc8a36ce8a101fac0bd7cc
Last active May 20, 2025 03:00
Enable fzf (fuzzy finder)

Mac OS

$ brew install fzf
# To install useful key bindings and fuzzy completion:
$ $(brew --prefix)/opt/fzf/install
@muhammad-asn
muhammad-asn / gist:b599405a16969d2ad4b518e3b5650bdb
Created May 17, 2025 07:34
Rancher Desktop Fix Cannot Start on Macbook M4 (ARM based)

Context: rancher-sandbox/rancher-desktop#797

$ mv ~/Library/Application\ Support/rancher-desktop/lima ~/.rdlima
$ ln -s ~/.rdlima ~/Library/Application\ Support/rancher-desktop/lima
@muhammad-asn
muhammad-asn / script.sh
Created May 11, 2025 06:29
Debug Thanos Distroless Image
#/bin/bash
kubectl debug -it thanos-storegateway-0 -n thanos --image=ubuntu:latest --share-processes --copy-to=thanos-debug --same-node
@muhammad-asn
muhammad-asn / deployment.tcp.yaml
Created April 28, 2025 03:43
Test UDP and TCP Connection in Kubernetes
## TCP Connection
apiVersion: v1
kind: Service
metadata:
name: nginx-service
namespace: monitoring
spec:
type: ClusterIP
selector:
app: nginx
@muhammad-asn
muhammad-asn / script.py
Created April 16, 2025 06:37
Script python to generate 6 chars
#!/bin/python3
import random; import string; ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(6))
@muhammad-asn
muhammad-asn / script.sh
Created April 8, 2025 02:43
WSL /var/run/docker.sock permissions fix
## Context: https://github.com/rancher-sandbox/rancher-desktop/issues/1156
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker
# And something needs to be done so $USER always runs in group `docker` on the `Ubuntu` WSL
sudo chown root:docker /var/run/docker.sock
sudo chmod g+w /var/run/docker.sock