-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
195 lines (183 loc) · 6.55 KB
/
.aliases
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Dotfiles management (https://news.ycombinator.com/item?id=11070798)
alias config="/usr/bin/git --git-dir=/home/rspk/.cfg/ --work-tree=/home/rspk"
alias cfst="config status"
alias cfc="config commit"
alias cfpp="config push"
alias cfdd="config diff"
# Edit and source .bashrc/.zshrc
alias brc="nvim ~/.bashrc && source ~/.bashrc"
alias zrc="nvim ~/.zshrc && source ~/.zshrc"
alias ..="cd .."
alias ...="cd ../.."
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ka="killall"
alias cp="cp -iv"
alias mv="mv -iv"
alias rm="rm -v"
alias mkd="mkdir -pv"
alias df="df -h"
alias free="free -h"
alias ll="ls -alh --color=auto --group-directories-first"
alias la="ls -ah --color=auto --group-directories-first"
alias ltr="tree -Csuh"
alias xclip="xclip -selectio c"
# Python
alias py="python3"
alias pyserver="python3 -m http.server"
alias pygrep='grep -nr --include="*.py"'
alias vact="source ./venv/bin/activate"
# JavaScript
alias npmi="npm init"
alias npmg="npm i -g "
alias npmst="npm start"
alias npmr="npm run"
# tmux
alias ta="tmux attach -t"
alias tad="tmux attach -d -t"
alias ts="tmux new-session -s"
alias tl="tmux list-sessions"
alias tksv="tmux kill-server"
alias tkss="tmux kill-session -t"
# pacman
alias pacupg="sudo pacman -Syu"
alias pacin="sudo pacman -S"
alias paclean="sudo pacman -Sc"
alias pacins="sudo pacman -U"
alias paclr="sudo pacman -Scc"
alias pacre="sudo pacman -R"
alias pacrem="sudo pacman -Rns"
alias pacrep="pacman -Si"
alias pacreps="pacman -Ss"
alias pacloc="pacman -Qi"
alias paclocs="pacman -Qs"
alias pacinsd="sudo pacman -S --asdeps"
alias pacmir="sudo pacman -Syy"
alias paclsorphans="sudo pacman -Qdt"
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
alias pacfileupg="sudo pacman -Fy"
alias pacfiles="pacman -F"
alias pacls="pacman -Ql"
alias pacown="pacman -Qo"
alias pacupd="sudo pacman -Sy"
alias upgrade="sudo pacman -Syu"
# apt
# alias agu="sudo apt update"
# alias agi="sudo apt install"
# alias agug="sudo apt upgrade"
# alias aguu="sudo apt update && sudo apt upgrade"
# alias agar="sudo apt autoremove"
# alias agr="sudo apt remove"
# alias agp="sudo apt purge"
# alias agud="sudo apt update && sudo apt dist-upgrade"
# nmap
alias nmap_open_ports="nmap --open"
alias nmap_list_interfaces="nmap --iflist"
alias nmap_slow="sudo nmap -sS -v -T1"
alias nmap_fin="sudo nmap -sF -v"
alias nmap_full="sudo nmap -sS -T4 -PE -PP -PS80,443 -PY -g 53 -A -p1-65535 -v"
alias nmap_check_for_firewall="sudo nmap -sA -p1-65535 -v -T4"
alias nmap_ping_through_firewall="nmap -PS -PA"
alias nmap_fast="nmap -F -T5 --version-light --top-ports 300"
alias nmap_detect_versions="sudo nmap -sV -p1-65535 -O --osscan-guess -T4 -Pn"
alias nmap_check_for_vulns="nmap --script=vuln"
alias nmap_full_udp="sudo nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,443,3389 "
alias nmap_traceroute="sudo nmap -sP -PE -PS22,25,80 -PA21,23,80,3389 -PU -PO --traceroute "
alias nmap_full_with_scripts="sudo nmap -sS -sU -T4 -A -v -PE -PP -PS21,22,23,25,80,113,31339 -PA80,113,443,10042 -PO --script all "
alias nmap_web_safe_osscan="sudo nmap -p 80,443 -O -v --osscan-guess --fuzzy "
alias nmap_ping_scan="nmap -n -sP"
# Git
alias g="git"
alias gb="git branch"
alias gbs="git bisect"
alias gc="git commit"
alias gco="git checkout"
alias gcb="git checkout -b"
alias gcm="git checkout main"
alias gf="git fetch"
alias gd="git diff"
alias gcl="git clone --recursive"
alias gr="git remote"
alias grup="git remote update"
alias grv="git remote -v"
alias gm="git merge"
alias gp="git push"
alias gst="git status"
alias gsrt="git shortlog"
alias gcount="git shortlog -sn"
alias grmv="git remote rename"
alias grrm="git remote remove"
alias grset="git remote set-url"
alias grh="git reset HEAD"
alias grhh="git reset HEAD --hard"
alias gfrh="git fetch; and git reset --hard"
alias gpr="git pull --rebase"
alias ga="git add"
alias gpf="git push --force"
alias glo="git log --oneline"
# Utilities
alias v="nvim"
alias v.="nvim ."
alias kppw="keepassxc-cli generate -L 50" # Password
alias kppp="keepassxc-cli diceware -W 8" # Passphrase
alias pw="cat /dev/urandom | tr -dc 'a-zA-Z0-9-!@#$%^&*()_+~' | fold -w 30 | head -n 1"
alias today="date +'%Y-%m-%d'"
alias unix="date '+%s'"
alias timer="time (read)" # Timer
alias pg="ping 8.8.8.8"
alias lynx='lynx -vikeys -accept_all_cookies'
alias pvpn="sudo protonvpn c"
alias dvpn="sudo protonvpn d"
alias ff="/opt/firefox_dev/firefox/firefox"
alias t="~/todo.txt-cli/todo.sh"
alias yt="youtube-dl --add-metadata -i"
alias dns="sudo nvim /etc/resolv.conf"
# Config files
alias dwmconfig="nvim ~/.suckless/dwm-6.2/config.h"
alias dwmstatconfig="nvim ~/.suckless/dwmstatus/dwmstatus.c"
alias slconfig="nvim ~/.suckless/slstatus/config.h"
alias stconfig="nvim ~/.suckless/st-0.8.2/config.h"
alias dmenuconfig="nvim ~/.suckless/dmenu/config.h"
alias surfconfig="nvim ~/.suckless/surf-2.0/config.h"
alias slockconfig="nvim ~/.suckless/slock-1.4/config.h"
alias sentconfig="nvim ~/.suckless/sent-1/config.h"
alias tabbedconfig="nvim ~/.suckless/tabbed/config.h"
alias zshconfig="nvim ~/.zshrc"
alias bashconfig="nvim ~/.bashrc"
alias fishconfig="cd ~/.config/fish;ranger"
alias xinitconfig="nvim ~/.xinitrc"
alias xprofileconfig="nvim ~/.xprofile"
alias vimconfig="nvim ~/.vimrc"
alias nvimconfig="nvim ~/.config/nvim/init.vim"
# alias emacsconfig
alias alaconfig="nvim ~/.config/alacritty/alacritty.yml"
alias tmuxconfig="nvim ~/.tmux.conf"
alias urxvtconfig="nvim ~/.Xresources"
alias urxvtperls="cd /usr/lib/x86_64-linux-gnu/urxvt/perl"
alias xup="xrdb ~/.Xresources"
alias i3config="nvim ~/.config/i3/config"
alias i3bconfig="nvim ~/.config/i3/i3blocks.conf"
alias polybarconfig="nvim ~/.config/polybar/config"
alias xmonadconfig="nvim ~/.xmonad/xmonad.hs"
alias xmobarconfig="nvim ~/.config/xmobar/xmobarrc"
alias sxconfig="nvim ~/.config/sxhkd/sxhkdrc"
alias bspconfig="nvim ~/.config/bspwm/bspwmrc"
alias irssiconfig="nvim ~/.irssi/config"
alias weechatconfig="nvim ~/.weechat/;ranger"
alias muttconfig="nvim ~/.mutt/muttrc"
alias neomuttconfig="nvim ~/.neomutt/neomuttrc"
alias zathuraconfig="nvim ~/.config/zathura/zathura"
alias roficonfig="nvim ~/.config/rofi/config"
alias neofetchconfig="nvim ~/.config/neofetch/config.conf"
alias rangerconfig="nvim ~/.config/ranger"
alias newsboatconfig="nvim ~/.config/newsboat/urls"
alias comptonconfig="nvim ~/.config/compton/compton.conf"
alias conkyconfig="nvim ~/.config/conky/conky.conf"
alias dunstconfig="nvim ~/.config/dunst/dunstrc"
# Etc.
alias pr="cd ~/main/src/rsapkf"
alias rgw="cd ~/main/src/rsapkf/www/src/content && rg -S "
alias www="cd ~/main/src/rsapkf/www && nvim ./"