Skip to content

Instantly share code, notes, and snippets.

@vrahmanov
vrahmanov / RM.md
Created September 1, 2025 17:12
kubectl-helper

Kubernetes Deployment Troubleshooter

A comprehensive bash script that automatically identifies root causes of Kubernetes deployment failures. This script can be sourced from anywhere and provides detailed analysis of deployment issues.

Features

  • Automatic Health Detection: Automatically detects if deployments are healthy or have issues
  • Comprehensive Analysis: Covers deployments, pods, containers, networking, storage, and configuration
  • Real-time Investigation: Fetches events, logs, and status information to identify root causes
  • Color-coded Output: Easy-to-read colored output with timestamps
@vrahmanov
vrahmanov / bugen.sh
Created November 14, 2024 09:12
MacOsBackUpPack
#!/bin/bash
# Define output files
BREW_FILE="brew_list.txt"
CASK_FILE="cask_list.txt"
APP_FILE="app_list.txt"
VSCODE_FILE="vscode_extensions.txt"
# Backup Homebrew packages
echo "Collecting Homebrew packages..."
//
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
@vrahmanov
vrahmanov / thor
Created March 27, 2024 20:32
make cert in multiline to one line
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' CERT.pem | pbcopy
@vrahmanov
vrahmanov / Delete.sh
Last active March 10, 2024 18:48
Delete files by name
find . -name 'FILE-*.yaml' -exec rm {} \;
find . -name 'prod-*' -type d -exec rm -rf {} \;
@vrahmanov
vrahmanov / scrapper.sh
Last active January 30, 2024 09:34
gcp scrapper
#!/bin/bash
# Set project ID
project_id="qwilt-playground"
# Get all clusters in the project
clusters=$(gcloud container clusters list --project=$project_id --format="yaml(name)")
# Loop through each cluster
for cluster in $clusters; do
@vrahmanov
vrahmanov / test.sh
Last active January 29, 2024 07:11
Bombocluch
for i in $(find . -iname "dev-ci-env.yaml");do echo $i ; SOME ACTION ON ALL ; done
@vrahmanov
vrahmanov / helm_split.sh
Last active September 8, 2023 13:06
helm_split.sh
#!/bin/bash
chart=Chart.yaml
length=$(yq '.dependencies | length' $chart)
for j in $(seq $length $END); do
iter=$(($j-1))
repo=$(yq .dependencies[$iter].repository $chart)
name=$(yq .dependencies[$iter].name $chart)
version=$(yq .dependencies[$iter].version $chart)
app_version=$(yq .appVersion $chart)
randomizer=$RANDOM
@vrahmanov
vrahmanov / brew_gist.sh
Created September 8, 2023 05:28
brew_gist
#!/bin/bash
printf "\n======= Generic Os Info =======\n"
uname -a
printf "\n======= Generic User Info =======\n"
whoami
printf "\n======= Generic Current Location Info =======\n"
pwd
printf "\n======= Generic Hostname Info =======\n"
hostname
printf "\n======= Generic Public IP Info =======\n"