This file contains hidden or 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
dls () { | |
print -l *(/) | |
} | |
This file contains hidden or 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 | |
ps -e -orss=,args= | sort -b -k1 -nr | head -20 |
This file contains hidden or 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
appname= XX; | |
for line in $(ps -e -orss=,args= | sort -b -k1 -nr | grep $appname | cut -d' ' -f1); | |
do | |
declare -i mem; mem="$line/1024"; echo "$mem M"; | |
done |
This file contains hidden or 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 | |
for ns in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}"); do | |
for cj in $(kubectl get cronjobs -n "$ns" -o name); do | |
kubectl patch "$cj" -n "$ns" -p '{"spec" : {"suspend" : true }}'; | |
done | |
done |
This file contains hidden or 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/sh | |
function parse_yaml { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\):|\1|" \ | |
-e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; |
This file contains hidden or 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 | |
for x in \ | |
nvidia-460.67-5-x86_64.pkg.tar.zst \ | |
nvidia-dkms-460.67-1-x86_64.pkg.tar.zst \ | |
nvidia-settings-460.67-1-x86_64.pkg.tar.zst \ | |
nvidia-utils-460.67-1-x86_64.pkg.tar.zst \ | |
; do | |
test -f $x || \ |
NewerOlder