kubectl -n draco get vpa -o json | yq '.items[].status.recommendation.containerRecommendations[] | (.containerName +","+.target.cpu + "," + .upperBound.cpu +","+ .target.memory + "," + .upperBound.memory) '
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ---------------------------------------------------------------------------- | |
# Script: finalize_and_delete_namespace.sh | |
# Description: This script resolves a stuck Kubernetes namespace that is in | |
# "Terminating" state by removing the finalizers from the namespace, | |
# and then optionally deletes the namespace upon user confirmation. | |
# | |
# Created based on the steps provided in: | |
# https://repost.aws/knowledge-center/eks-terminated-namespaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define variables | |
ORG="myOrg" | |
TEAM="myTeam" | |
PERMISSION="push" | |
# Check if the team exists | |
team_exists=$(gh api \ | |
-H "Accept: application/vnd.github+json" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
kafka: | |
image: 'bitnami/kafka:latest' | |
ports: | |
- "9092:9092" | |
- "9094:9094" | |
volumes: | |
- "kafka_data:/bitnami" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to get all namespaces | |
get_namespaces() { | |
kubectl get namespaces --no-headers -o custom-columns=NAME:.metadata.name | grep -Ev "^(kube-system|kube-public|kube-node-lease|istio.*|gke.*)$" | |
} | |
# Function to get pods based on condition | |
get_pods() { | |
local namespace=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"grinning","smiley","smile","grin","laughing","sweat_smile","joy","slightly_smiling_face","upside_down_face","wink","blush","innocent","heart_eyes","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","thinking_face","zipper_mouth_face","neutral_face","expressionless","no_mouth","smirk","unamused","face_with_rolling_eyes","grimacing","relieved","pensive","sleepy","sleeping","mask","face_with_thermometer","face_with_head_bandage","dizzy_face","sunglasses","nerd_face","confused","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","triumph","rage","angry","smiling_imp","imp","skull","skull_and_crossbones","hankey","japanese_ogre","japanese_goblin","ghost","ali |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=SSH idle shutdown | |
After=ssh.service | |
[Service] | |
ExecStart=/usr/bin/sshIdleShutdown.sh | |
Restart=on-failure | |
RestartSec=5s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from transformers import BertTokenizer, BertForSequenceClassification | |
# load the labeled helpdesk ticket dataset | |
df = pd.read_csv("helpdesk_tickets.csv") | |
# preprocess the text data | |
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") | |
df["text"] = df["text"].apply(lambda x: tokenizer.tokenize(x)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it | |
~/.bash_it/install.sh | |
# install fzf | |
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf | |
~/.fzf/install --all | |
#install zoxide | |
curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g mouse on | |
bind C-c new-session | |
bind r source ~/.tmux.conf | |
set -sg escape-time 50 | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'arcticicestudio/nord-tmux' | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' |
NewerOlder