-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.sh
71 lines (59 loc) · 1.3 KB
/
functions.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
klogfall () {
kubectl logs -f deployment/$1 --all-containers
}
klogfapp () {
kubectl logs -f deployment/$1 -c $1
}
sha256verify() {
echo "$1 $2" | sha256sum --check
}
sha384verify() {
echo "$1 $2" | sha384sum --check
}
sha512verify() {
echo "$1 $2" | sha512sum --check
}
goGo() {
name=$1
dirname=${name#*/}
basename=${name##*/}
set -x
cd ~/dev
mkdir -p ${dirname}
cd ${dirname}
mkdir -p cmd/${basename}
mkdir pkg/
go mod init ${name}
git init
echo "# ${basename}" > README.md
echo "package main" > cmd/${basename}/main.go
echo "${basename}:\n\tgo build -o bin/${basename} cmd/${basename}/*.go\n" > Makefile
git add .
git commit -a -m "initial commit"
}
ppgrep() {
pgrep "$@" | xargs ps -fp 2> /dev/null;
}
killport() {
lsof -i:$1 -tl | xargs kill
}
zoom() {
open "zoommtg://zoom.us/join?confno=$1"
}
jwt() {
echo -n $1 | jc --jwt | jq
}
hedo() {
adam=$(id | grep -o "80(admin)")
if [[ "$adam" != "" ]]; then
echo "I Have The Power"
else
echo "By The Power Of Greyskull"
/Applications/Privileges.app/Contents/Resources/PrivilegesCLI --add
echo "I Have The Power"
fi
}
hedont() {
/Applications/Privileges.app/Contents/Resources/PrivilegesCLI --remove
echo "Power gone..."
}