-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
97 lines (76 loc) · 1.92 KB
/
.bashrc
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Enable the subsequent settings only in interactive sessions
case $- in
*i*) ;;
*) return;;
esac
OMB_USE_SUDO=true
completions=(
git
composer
ssh
)
aliases=(
general
)
plugins=(
git
bashmarks
)
# Custom pastebin/image host
ez-paste() {
local apikey="apikey"
local file="$1"
if [ ! -f "$file" ]; then
echo "File not found: $file"
return 1
fi
local response=$(curl -s -X POST \
-F "file=@$file;type=text/plain" \
-H "key: $apikey" \
https://api.e-z.host/paste/file)
local pasteUrl=$(echo "$response" | jq -r '.pasteUrl')
local deletionUrl=$(echo "$response" | jq -r '.deletionUrl')
local error=$(echo "$response" | jq -r '.error')
echo "Paste URL: $pasteUrl"
echo "Deletion URL: $deletionUrl"
if [ "$error" != "null" ]; then
echo "Error Message: $error"
fi
}
ez-media() {
local apikey="apikey"
local file="$1"
if [ ! -f "$file" ]; then
echo "File not found: $file"
return 1
fi
local mimetype=$(file -b --mime-type "$file")
local response=$(curl -s -X POST \
-F "file=@$file;type=$mimetype" \
-H "key: $apikey" \
https://api.e-z.host/files)
local imageUrl=$(echo "$response" | jq -r '.imageUrl')
local deletionUrl=$(echo "$response" | jq -r '.deletionUrl')
local error=$(echo "$response" | jq -r '.error')
if [ "$imageUrl" != "null" ]; then
echo "Image URL: $imageUrl"
fi
if [ "$deletionUrl" != "null" ]; then
echo "Deletion URL: $deletionUrl"
fi
if [ "$error" != "null" ]; then
echo "Error Message: $error"
fi
}
#custom path
PATH=$PATH:/c/tools/
PATH=$PATH:/c/tools/C/
PATH=$PATH:/c/Users/cyadine/.local/bin/
#custom alias
alias ff='fastfetch'
alias c='clear'
alias mpv='mpv.com'
alias ll='ls -la'
eval "$(zoxide init bash)"
eval "$(fzf --bash)"
eval "$(starship init bash)"