.zshrc
@@ -8,7 +8,7 @@ fi | |||
8 | 8 | export ZSH="/root/.oh-my-zsh" | |
9 | 9 | PATH=/snap/bin:/usr/sbin:/sbin:/usr/local/sbin:$PATH | |
10 | 10 | export LC_ALL="en_US.UTF-8" | |
11 | - | ZSH_THEME="jonathan" | |
11 | + | ZSH_THEME="aussiegeek" | |
12 | 12 | plugins=( | |
13 | 13 | zsh-syntax-highlighting | |
14 | 14 | zsh-autosuggestions |
.zshrc
@@ -8,9 +8,8 @@ fi | |||
8 | 8 | export ZSH="/root/.oh-my-zsh" | |
9 | 9 | PATH=/snap/bin:/usr/sbin:/sbin:/usr/local/sbin:$PATH | |
10 | 10 | export LC_ALL="en_US.UTF-8" | |
11 | - | ZSH_THEME="junkfood" | |
11 | + | ZSH_THEME="jonathan" | |
12 | 12 | plugins=( | |
13 | - | git | |
14 | 13 | zsh-syntax-highlighting | |
15 | 14 | zsh-autosuggestions | |
16 | 15 | ) |
.zshrc(檔案已創建)
@@ -0,0 +1,119 @@ | |||
1 | + | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
2 | + | # Initialization code that may require console input (password prompts, [y/n] | |
3 | + | # confirmations, etc.) must go above this block; everything else may go below. | |
4 | + | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
5 | + | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
6 | + | fi | |
7 | + | ||
8 | + | export ZSH="/root/.oh-my-zsh" | |
9 | + | PATH=/snap/bin:/usr/sbin:/sbin:/usr/local/sbin:$PATH | |
10 | + | export LC_ALL="en_US.UTF-8" | |
11 | + | ZSH_THEME="junkfood" | |
12 | + | plugins=( | |
13 | + | git | |
14 | + | zsh-syntax-highlighting | |
15 | + | zsh-autosuggestions | |
16 | + | ) | |
17 | + | source $ZSH/oh-my-zsh.sh | |
18 | + | alias sync="rsync -avz -e 'ssh -p1079'" | |
19 | + | alias udemydl="youtube-dl -u malin@cenusa.me -o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s'" | |
20 | + | alias clmac="find ./ -name '._*' -o -name '.DS_Store' -o -name '.apdisk' -o -name '.lyndisk' | sed 's/.*/\"&\"/' | xargs rm -rfv" | |
21 | + | alias cpwp="cp -a /root/wordpress/* ." | |
22 | + | alias fixow="chown -R nobody:nogroup ./" | |
23 | + | alias wpht="cat /root/.htaccess >> ./.htaccess" | |
24 | + | alias fixwp="cpwp && wpht && fixow" | |
25 | + | alias goup="apt update && apt upgrade -y && apt autoremove && apt dist-upgrade -y" | |
26 | + | alias flt="mkdir $1{files,tmp,log}" | |
27 | + | alias wssl="wget --no-check-certificate" | |
28 | + | alias wrip="wget -r -nc -np" | |
29 | + | alias move="rsync -avz --remove-source-files --progress" | |
30 | + | alias wbulk="wget --content-disposition -c -N --tries=0 --read-timeout=20 -q --show-progress" | |
31 | + | alias mp3rip="youtube-dlc --restrict-filenames --extract-audio --audio-format mp3" | |
32 | + | alias cleancrap="find ./ -type f -regex '.*\.exe\|.*\.diz\|.*\.nfo\|.*\.txt\|.*\.url\|.*\.nzb\|.*\.torrent' -exec rm -rfv {} \;" | |
33 | + | alias license="/usr/local/cpanel/cpkeyclt" | |
34 | + | ||
35 | + | editz() { | |
36 | + | pdnsutil edit-zone $1 | |
37 | + | } | |
38 | + | ||
39 | + | createz() { | |
40 | + | pdnsutil create-zone $1 | |
41 | + | } | |
42 | + | ||
43 | + | push() { | |
44 | + | for i in {1..10} | |
45 | + | do | |
46 | + | pdnsutil increase-serial $1 | |
47 | + | pdns_control notify $1 | |
48 | + | done | |
49 | + | } | |
50 | + | ||
51 | + | sslcert() { | |
52 | + | certbot certonly --webroot -w /home/www/$1/files -d $1 -d www.$1 -d cdn.$1 | |
53 | + | } | |
54 | + | ||
55 | + | wban() { | |
56 | + | fail2ban-client set wordpress banip $1 | |
57 | + | } | |
58 | + | ||
59 | + | flickr() { | |
60 | + | ruby flickr-photo-downloader.rb $1 -d /flickr/$2 | |
61 | + | } | |
62 | + | ||
63 | + | weather() { | |
64 | + | curl "wttr.in/${1:-vilafranca de bonany}?m" | |
65 | + | } | |
66 | + | ||
67 | + | resolve() { | |
68 | + | dig +short $1 $2 | |
69 | + | } | |
70 | + | ||
71 | + | ns12() { | |
72 | + | echo -n 'NS1: '; dig +short $1 @ns1.palmasolutions.net | |
73 | + | echo -n 'NS2: '; dig +short $1 @ns2.palmasolutions.net | |
74 | + | } | |
75 | + | ||
76 | + | ttfb() { | |
77 | + | curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup} seconds\nConnect Time:\t\t%{time_connect} seconds\nAppCon Time:\t\t%{time_appconnect} seconds\nRedirect Time:\t\t%{time_redirect} seconds\nPre-transfer Time:\t%{time_pretransfer} seconds\nStart-transfer Time:\t%{time_starttransfer} seconds\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null https://$1 | |
78 | + | } | |
79 | + | ||
80 | + | lcheck() { | |
81 | + | latency=`ttfb $1 | grep Total | cut -f3-` | |
82 | + | if (( $(bc -l <<< "$latency >= 1") )); | |
83 | + | then | |
84 | + | echo -n $1; echo -n ' > lag > '; echo $latency | |
85 | + | else | |
86 | + | echo -n $1; echo -n ' > no lag > '; echo $latency | |
87 | + | fi | |
88 | + | } | |
89 | + | ||
90 | + | pwg() { | |
91 | + | printf "%s" "$(tr -cd '[:graph:]' < /dev/urandom | tr -d '\-#&\+,\.\/\:\`\"'\' | head -c"${1:-32}")"; | |
92 | + | }; | |
93 | + | ||
94 | + | getpings() { | |
95 | + | for i in $(cat /root/sites); | |
96 | + | do lcheck $i; | |
97 | + | done | |
98 | + | } | |
99 | + | ||
100 | + | alias dfd='df -h | grep -e "/dev/sd" -e "Filesystem" --color=never' | |
101 | + | ||
102 | + | login() { | |
103 | + | ssh root@$i -p 1079 | |
104 | + | } | |
105 | + | ||
106 | + | wlfw() { | |
107 | + | ufw allow from $1 to any port $2 proto $3 comment "$4" | |
108 | + | } | |
109 | + | ||
110 | + | inst() { | |
111 | + | apt install $1 -y | |
112 | + | } | |
113 | + | ||
114 | + | ripw() { | |
115 | + | wget -r -np -nc --tries=0 --reject iso,exe,html,htm,nfo,nzb,torrent --read-timeout=20 --no-check-certificate -q --show-progress $1 | |
116 | + | } | |
117 | + | ||
118 | + | # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. | |
119 | + | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh |
上一頁
下一頁