Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1210 lines
28 KiB

5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
1 year ago
5 years ago
4 years ago
5 years ago
1 year ago
5 years ago
6 years ago
1 year ago
5 years ago
6 years ago
5 years ago
6 years ago
6 years ago
5 years ago
6 years ago
6 years ago
1 year ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
1 year ago
1 year ago
4 years ago
1 year ago
5 years ago
1 year ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
2 years ago
5 years ago
1 year ago
5 years ago
1 year ago
4 years ago
5 years ago
5 years ago
1 year ago
5 years ago
1 year ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
2 years ago
6 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
3 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
6 years ago
4 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
2 years ago
2 years ago
2 years ago
6 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
1 year ago
2 years ago
1 year ago
2 years ago
5 years ago
6 years ago
6 years ago
5 years ago
6 years ago
2 years ago
1 year ago
3 years ago
3 years ago
1 year ago
1 year ago
4 years ago
4 years ago
4 years ago
  1. # vim: fdm=marker ft=go-template.sh syntax=sh
  2. # system [[[
  3. # basic [[[ #
  4. # clear screen
  5. c "printf '\033c'"
  6. d "cd ~/Downloads && printf '\033c'"
  7. # e "echo \$"
  8. hst "history"
  9. # nft "printf '\033c' && neofetch | lolcat"
  10. nfth "printf '\033c' && neofetch"
  11. fi "fish"
  12. # reload urxvt
  13. ru "xrdb ~/.Xresources && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
  14. dua "du -ah --apparent-size | sort -h"
  15. # list file sizes in megabytes with depth 1
  16. # duh "sudo du -d 1 -h --apparent-size | sort -h"
  17. # dum "sudo du -d 1 -m --apparent-size | sort -h"
  18. duh "du -d 1 -h --apparent-size | sort -h"
  19. dum "du -d 1 -m --apparent-size | sort -h"
  20. # m "man"
  21. td "tldr"
  22. whi "whereis"
  23. # ]]] basic #
  24. # display [[[ #
  25. # nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'"
  26. {{ if eq .chezmoi.hostname "nzxt" }}
  27. xra "xrandr --auto"
  28. xrs "xrandr --auto && xrandr --output HDMI-0 --right-of DVI-I-1"
  29. xrn "xrandr --output HDMI-0 --rotate normal && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
  30. xrr "xrandr --output HDMI-0 --rotate right && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
  31. {{ end }}
  32. {{ if eq .chezmoi.hostname "x1-carbon" }}
  33. xro "xrandr --output HDMI2 --off"
  34. xrl "xrandr --output HDMI2 --auto --left-of eDP1 --scale 1.33x1.33 && xrandr --output eDP1 --panning 2560x1440+2554+0"
  35. xrr "xrandr --output HDMI2 --auto --right-of eDP1 --scale 1.33x1.33"
  36. xrm "xrandr --output HDMI2 --auto --same-as eDP1 --scale 1.33x1.33"
  37. xrs "xrandr -s 0"
  38. {{ end }}
  39. # ]]] display #
  40. ngb "sudo nvim /etc/default/grub"
  41. mgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
  42. # a "bat"
  43. b "bat"
  44. # ba "bat *"
  45. awkp "awk -F',' '{print \$0}'"
  46. cpr "cp -r"
  47. fdc "fd -i"
  48. fde "fd -e"
  49. grep "grep --color=auto -n"
  50. grpr "grep -r"
  51. rgc "rg -i"
  52. rge "rg -t"
  53. xa "xargs"
  54. # pk "pkill -f"
  55. cld "colordiff -wy --suppress-common-lines"
  56. mkpk "makepkg -sri"
  57. ex "chmod +x"
  58. lns "ln -s"
  59. src "source"
  60. # systemctl [[[ #
  61. ct "sudo systemctl"
  62. cte "sudo systemctl enable"
  63. ctd "sudo systemctl daemon-reload"
  64. ctdi "sudo systemctl disable"
  65. cta "sudo systemctl start"
  66. cts "sudo systemctl stop"
  67. ctt "sudo systemctl status"
  68. # ctr "sudo systemctl restart"
  69. ctltd "sudo systemctl status dhcpcd"
  70. ctlas "sudo systemctl start sshd"
  71. nc "sudo netctl"
  72. ncd "sudo ip link set dev wlp4s0 down"
  73. ncu "sudo ip link set dev wlp4s0 up"
  74. ncr "sudo systemctl restart netctl-auto@wlp3s0.service"
  75. ncs "sudo systemctl stop netctl-auto@wlp3s0.service"
  76. ncn "netctl start"
  77. # ]]] systemctl #
  78. # ssh [[[ #
  79. # ss "ssh"
  80. cpssh "ssh-copy-id -i ~/.ssh/id_rsa.pub"
  81. xcssh "bat ~/.ssh/id_rsa.pub | xclip -selection clipboard"
  82. # digital ocean
  83. ssd "mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a"
  84. sdh "mosh --ssh='ssh -p 399' kevin@165.22.239.234 htop"
  85. scd "scp -P 399 kevin@165.22.239.234"
  86. sfd "sftp -rP 399 kevin@165.22.239.234"
  87. # phone [[[ #
  88. ssp "mosh --ssh='ssh -p 8022' $PHONE_IP"
  89. scpp "scp -P 8022 $PHONE_IP:"
  90. sfp "sftp -rP 8022 $PHONE_IP"
  91. rsp "rsync --ignore-existing -Ptre 'ssh -p 8022' $PHONE_IP:"
  92. # ]]] phone #
  93. # pixel [[[ #
  94. sspx "mosh --ssh='ssh -p 8022' $PIXEL_IP"
  95. scpx "scp -P 8022 $PIXEL_IP:"
  96. sfpx "sftp -rP 8022 $PIXEL_IP"
  97. rspx "rsync --ignore-existing -Ptre 'ssh -p 8022' $PIXEL_IP:"
  98. # ]]] pixel #
  99. ssl "mosh --ssh='ssh -p 399' kevin@$LAPTOP_IP"
  100. # vultr
  101. ssa "mosh atxadmin@45.32.87.10"
  102. # ssv "mosh kevin@45.32.87.10"
  103. # test server sites
  104. # svp "firefox git.ataraxy.tk khkm.tk cal.khkm.tk pste.gq smol.gq twem.tk"
  105. # postgres ssh tunnel
  106. sdt "ssh kevin@165.22.239.234 -L 5433:localhost:5432"
  107. # ]]] ssh #
  108. wh "watch"
  109. w60 "watch -n60 '"
  110. ct "crontab"
  111. cte "crontab -e"
  112. wm "sudo wifi-menu"
  113. # mounting [[[ #
  114. udm "udisksctl mount -b"
  115. udmi "ifuse /mnt/ipad"
  116. udmb "udisksctl mount -b /dev/sdc2"
  117. udu "udisksctl unmount -b"
  118. udub "udisksctl unmount -b /dev/sdc2"
  119. udui "umount /mnt/ipad"
  120. # ]]] mounting #
  121. tc "touch"
  122. vd "vidir --verbose"
  123. # directory-related [[[ #
  124. {{ if not (eq .linux_os "termux") }}
  125. l "lsd -F --group-dirs first"
  126. la "lsd -AF --group-dirs first"
  127. ld "lsd -F --group-dirs first -d */"
  128. ll "lsd -lF --group-dirs first --size short"
  129. lld "lsd -lF --group-dirs first --size short -d */"
  130. lls "lsd -lF --group-dirs first --size short -Sr"
  131. llt "lsd -lF --group-dirs first --size short -tr"
  132. lla "lsd -AlF --group-dirs first --size short"
  133. {{ else }}
  134. l "ls"
  135. la "ls -a"
  136. ll "ls -l"
  137. lla "ls -al"
  138. {{ end }}
  139. cwd "echo (pwd) | xclip -selection clipboard"
  140. smv "sudo mv"
  141. f "cd"
  142. fz "fzf -e"
  143. fbg "cd ~/Pictures/Backgrounds && ranger --selectfile (fzf -e --delimiter '/' --with-nth -1)"
  144. fnd "find . -type f -name"
  145. # p "pwd"
  146. rmr "rm -rf"
  147. # rmd "rm ~/Downloads/*"
  148. rmw "rm ~/.local/share/nvim/swap/"
  149. md "mkdir -p"
  150. rsy "rsync --ignore-existing -Ptr"
  151. # list all (un)mounted drives
  152. lhd "sudo fdisk -l"
  153. # get disc space for mounted drives
  154. # ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null"
  155. ds "df -h | head -n 1 && df -h | grep sd"
  156. chownw "sudo chown -R kevin:wheel"
  157. chwnm "sudo chown -R kevin:wheel /run/media/{{ .chezmoi.username }}"
  158. # cd into backup folder and show backup sizes
  159. lbu "cd /run/media/kevin/backup-hd/{{ .chezmoi.hostname }}/tar && lsd -l"
  160. uzl "unzip -l"
  161. # ]]] directory-related #
  162. # power options [[[ #
  163. s "systemctl suspend"
  164. # sl "i3lock-fancy && systemctl suspend"
  165. # so "xset dpms force off"
  166. xx "exit"
  167. sof "xset dpms force off"
  168. son "xset s off -dpms"
  169. sd "tmux kill-server; systemctl poweroff"
  170. rb "tmux kill-server; systemctl reboot"
  171. lgo "i3-msg exit"
  172. x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
  173. X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
  174. {{ if eq .chezmoi.hostname "x1-carbon" }}
  175. xl "xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE"
  176. XL "xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE"
  177. bt "~/linux-config/dot_config/i3blocks/scripts/executable_battery"
  178. {{ end }}
  179. # ]]] power options #
  180. # sound [[[ #
  181. {{ if eq .chezmoi.hostname "nzxt" }}
  182. vlm "alsamixer -c 0"
  183. vlh "alsamixer -c 2"
  184. {{ else }}
  185. vlm "alsamixer -c 1"
  186. {{ end }}
  187. # ]]] sound #
  188. # pkg management [[[ #
  189. {{ if eq .linux_os "arch" }}#[[[
  190. # pacman [[[ #
  191. # pc "sudo pacman -S"
  192. # pcq "sudo pacman -Qi"
  193. # pcr "sudo pacman -Rns"
  194. # pcud "sudo pacman -Sy"
  195. # pcug "sudo pacman -Syu"
  196. # xpc "pacman -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.hostname }}-pkgs.txt && pacman -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.hostname }}-aur.txt "
  197. # ]]] pacman #
  198. # tri "trizen -S --noconfirm"
  199. tri "trizen -S --noedit"
  200. # yay [[[ #
  201. # install
  202. ya "yay -S --answerclean=None --answerdiff=None --answeredit=None"
  203. # info
  204. yaq "yay -Qi"
  205. # list files
  206. yal "yay -Ql"
  207. # remove
  208. yar "yay -Rns"
  209. # search
  210. yas "yay -Qs"
  211. # sync
  212. yau "yay -Sy"
  213. # sync and download
  214. yadl "yay -Syuw --answerclean=None --answerdiff=None --answeredit=None"
  215. # sync and update
  216. yaug "yay -Syu --answerclean=None --answerdiff=None --answeredit=None"
  217. # ]]] yay #
  218. #]]]
  219. {{ else if eq .linux_os "termux" }}#[[[
  220. pki "pkg install"
  221. pkli "pkg list-installed"
  222. pku "pkg uninstall"
  223. pks "pkg search"
  224. xpk "pkg list-installed | awk -F/ '{print \$1}' > ~/{{ .chezmoi.os }}-config/txt/termux-pkgs.txt"
  225. {{ end }}#]]]
  226. # apt [[[ #
  227. {{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
  228. ap "apt install"
  229. apr "apt remove"
  230. apu "apt upgrade"
  231. {{ end }}
  232. # ]]] apt #
  233. # ]]] pkg management #
  234. # python [[[ #
  235. p "python"
  236. # py "python"
  237. py2 "python2"
  238. # pyt "printf '\033c' && pytest -vvs"
  239. # pyt "clear && tmux clear-history && pytest -vvs"
  240. pyt "clear && tmux clear-history && pytest --cov"
  241. pyts "clear && tmux clear-history && pytest -vv"
  242. pyu "python -m unittest"
  243. pipi "pip install"
  244. spipi "sudo pip install"
  245. # ]]] python #
  246. # internet [[[ #
  247. pg2 "ping -c 2 -W 1 8.8.8.8"
  248. pgt "ping -c 50 -W 1 8.8.8.8"
  249. wpg "watch ping -c 2 -W 1 8.8.8.8"
  250. pgc "ping 8.8.8.8"
  251. # dh "sudo dhcpcd"
  252. kdh "sudo killall dhcpcd"
  253. rdh "sudo killall dhcpcd && sudo dhcpcd"
  254. wgt "wget"
  255. {{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
  256. nt "nginx -t"
  257. {{ end }}
  258. # ]]] internet #
  259. whc "which"
  260. fl "file"
  261. id "identify"
  262. # rz "source ~/{{ .chezmoi.os }}-config/aliases/zsh_aliases"
  263. mst "sudo rm ~/st/config.h && sudo bear make -C ~/st install"
  264. # mst "sudo ~/st/make-st.sh"
  265. # system ]]]
  266. # applications [[[ #
  267. # silent="> /dev/null 2>&1& "
  268. 13 "rot13"
  269. am "antimicro"
  270. # task [[[ #
  271. a "task"
  272. aa "task add"
  273. aal "task add proj:lnx"
  274. aap "task add proj:"
  275. aas "task add proj:sch"
  276. # aam "task add proj:ms"
  277. aam "task add proj:mny"
  278. aap "task add proj:"
  279. # aacm "task add proj:codm"
  280. aacr "task add proj:crim"
  281. aaj "task add proj:pey +jira []"
  282. aapp "task add proj:pogo"
  283. aas "task add proj:sch"
  284. aay "task add proj:pey"
  285. ac "task context"
  286. acn "task context none && task"
  287. ach "task context home && task"
  288. acm "task context mny && task"
  289. aco "task context out && task"
  290. acp "task context pey && task"
  291. acnp "task context not-pey && task"
  292. acs "task context sch && task"
  293. af "task proj:"
  294. afcm "task proj:codm"
  295. afcr "task proj:crim"
  296. afs "task proj:sch"
  297. afy "task proj:pey"
  298. aj "task +jira"
  299. apl "task completed"
  300. al "task limit:15"
  301. alg "task log"
  302. algy "task log proj:pey"
  303. ans "task +next"
  304. ao "taskopen -A"
  305. asm "task summary"
  306. awt "task waiting"
  307. ay "task sync"
  308. # ]]] task #
  309. # buku [[[ #
  310. # b "buku"
  311. # bd "buku -a '"
  312. bdb "sqlitebrowser ~/.local/share/buku/bookmarks.db &"
  313. bh "buku -h | bat"
  314. bi "buku --immutable 1 -zu"
  315. bo "buku -o"
  316. bp "buku -p"
  317. br "buku -zd"
  318. brp "buku --replace"
  319. bs "buku --deep -n5 -s"
  320. bsq "sqlitebrowser ~/.local/share/buku/bookmarks.db &"
  321. bsv "bukuserver run --host 127.0.0.1 --port 5001"
  322. bt "buku --deep -n5 -t"
  323. bu "buku -zu"
  324. but "buku -zu --tag"
  325. bw "buku --immutable 1 -w -1"
  326. # ]]] buku #
  327. cc "calcurse"
  328. ccc "calcurse -D ~/.calcurse/alt-cals/class"
  329. cci "calcurse -i"
  330. ccs "calcurse-caldav"
  331. chr "google-chrome"
  332. cht "chatterino"
  333. # clc "cloc ."
  334. clc "cloc . --vcs=git"
  335. cm "compton &"
  336. cv "cava"
  337. dg "dragon-drag-and-drop -x"
  338. fx "firefox -P"
  339. fxd "firefox -P default"
  340. fxw "firefox -P work"
  341. fh "feh"
  342. fi "fish"
  343. gpd "gpg --decrypt"
  344. gpe "gpg --encrypt --recipient"
  345. gtm "gotop -m"
  346. hb "habitctl log"
  347. # hbe "habitctl edit"
  348. # hbeh "habitctl edith"
  349. htc "htop -s PERCENT_CPU"
  350. htm "htop -s PERCENT_MEM"
  351. # i "sxiv"
  352. ia "sxiv -a"
  353. it "sxiv -t *"
  354. kill "kill -9"
  355. ka "killall"
  356. kc "killall chromium"
  357. kcm "killall compton"
  358. kd "killall Discord && killall Discord"
  359. ke "killall electron"
  360. kf "killall firefox"
  361. kag "killall gopls"
  362. kai "killall imwheel && imwheel"
  363. kt "killall thunderbird"
  364. kz "killall zoom"
  365. m "mpv"
  366. mp "mpv --volume=50"
  367. mpvv "mpv --volume=50"
  368. mpl "mpv --loop"
  369. msf "mpv --sub-file="
  370. mna "mpv --no-audio"
  371. mnv "mpv --no-video"
  372. # lo "libreoffice"
  373. lop "libreoffice --headless --convert-to pdf --outdir ."
  374. mra "man ranger"
  375. # mt "minetest"
  376. n "nvim"
  377. nl "nload devices wlp4s0 -u M"
  378. nm "nomacs . &"
  379. np "nvim --"
  380. ndu "ncdu"
  381. p3 "python3"
  382. pdft "pdftotext"
  383. pdu "pdfunite"
  384. pipes "pipes.sh -t 3"
  385. pcp "pycp"
  386. pmv "pymv"
  387. py "python"
  388. q "qalc '"
  389. qe "qalc -e '1USD to CAD'"
  390. qg "qalculate-gtk"
  391. r "ranger"
  392. rbg "ranger --selectfile (grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2)"
  393. # rgc "printf '\033c' && rg"
  394. # rgc "printf '\033c' && rg"
  395. rgc "clear && tmux clear-history && rg -S"
  396. rx "redshift -x"
  397. scm "sc-im"
  398. sn "sudo nvim"
  399. sqlb "sqlitebrowser"
  400. # ss "mosh"
  401. stp "termdown"
  402. # h "termdown"
  403. # sw "swex"
  404. # t "tmux"#[[[
  405. # ta "tmux a -t"
  406. tabu "tmux a -t backup || tmux new -s backup"
  407. tacf "tmux a -t config || tmux new -s config"
  408. tacm "tmux a -t codm || tmux new -s codm"
  409. tacr "tmux a -t crimson || tmux new -s crimson"
  410. taj "tmux a -t journal || tmux new -s journal"
  411. tarh "tmux a -t red-hat || tmux new -s red-hat"
  412. tar2 "tmux a -t red-hat-2 || tmux new -s red-hat-2"
  413. tas "tmux a -t school || tmux new -s school"
  414. tas2 "tmux a -t school-2 || tmux new -s school-2"
  415. tas3 "tmux a -t school-3 || tmux new -s school-3"
  416. tas4 "tmux a -t school-4 || tmux new -s school-4"
  417. tal "tmux a"
  418. tc "clear && tmux clear-history"
  419. # tk "tmux kill-server"
  420. tks "tmux kill-session -t"
  421. tksv "tmux kill-server"
  422. tl "tmux ls"
  423. tn "tmux new -s"
  424. tnb "tmux new -s backup"
  425. #]]]
  426. usn "usernames --num 20"
  427. vmd "vimdiff"
  428. # wg "wego"
  429. ytd "youtube-dl"
  430. wcl "wc -l"
  431. wcw "wc -w"
  432. wch "weechat"
  433. # wg "wego"
  434. # wg "curl wttr.in"
  435. # wg "curl -L wthr.ml"
  436. wgm "curl -L wthr.ml/m"
  437. wgt "curl -L wthr.ml/t"
  438. yt "youtube-dl"
  439. z "zathura --fork"
  440. lz "unzip -l"
  441. trl "tar tvzf"
  442. trx "tar xvzf"
  443. # pass [[[ #
  444. # p "pass"
  445. # pc "pass -c"
  446. pe "pass edit"
  447. pei "pass edit info"
  448. pi "pass insert -m"
  449. pg "pass generate -c"
  450. ps "pass show"
  451. psi "pass show info | bat"
  452. pev "pass edit finances/visa"
  453. xc "xclip -selection clipboard"
  454. xo "xclip -o >"
  455. yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard"
  456. yg "xclip -selection clipboard ~/.password-store/social/gmail"
  457. ytb "xclip -selection clipboard ~/.password-store/social/trapbot"
  458. yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard"
  459. # ]]] pass #
  460. # watson [[[ #
  461. w "watson"
  462. # start [[[ #
  463. wa "watson start"
  464. wacm "watson start fun +cod-mobile"
  465. wae "watson start && watson edit"
  466. wad "watson add"
  467. we "watson edit"
  468. wre "watson restart"
  469. wree "watson restart && watson edit"
  470. # ]]] start #
  471. # stop [[[ #
  472. ws "watson status && watson stop"
  473. wse "watson stop && watson edit"
  474. wsc "watson cancel"
  475. wsl "watson stop && watson log --day"
  476. wt "watson status"
  477. # ]]] stop #
  478. # log/report [[[ #
  479. wl "watson log -Gcd"
  480. wla "watson log -Gcap"
  481. wlat "watson log -GcaT"
  482. ww "watson log -Gc"
  483. wwa "watson log -Gc | bat"
  484. wr "watson report -Gcd"
  485. wra "watson report -Gcap"
  486. wram "watson report -Gca | rg -S '^\w.*-\s\d*h' | sort -t' ' -hk3 | sed 's/ - /,/' | xsv table"
  487. wrat "watson report -GcaT"
  488. wrf "watson report -Gc --from ''"
  489. wrm "watson report -GcmT"
  490. wrw "watson report -Gc"
  491. # ]]] log/report #
  492. # ]]] watson #
  493. # timetrace [[[ #
  494. tt "timetrace"
  495. tta "timetrace start"
  496. ttaa "timetrace start a3@300"
  497. tte "timetrace edit record latest"
  498. # ttc "timetrace create"
  499. ttc "timetrace create project"
  500. ttp "timetrace create project"
  501. ttl "timetrace list records today"
  502. ttlp "timetrace list projects"
  503. ttr "timetrace report"
  504. tts "timetrace stop"
  505. ttt "timetrace status"
  506. # ]]] timetrace #
  507. # ]]] applications #
  508. # git [[[ #
  509. g "git"
  510. gi "git init"
  511. gib "git init --bare"
  512. gstr "git config credential.helper store"
  513. gstrp "git config credential.helper store && git push"
  514. # branch [[[ #
  515. gb "git branch"
  516. gbd "git branch -D"
  517. gba "git branch --no-merged && echo '' && git branch --merged"
  518. gbu "git branch --no-merged"
  519. gbm "git branch --merged"
  520. gbr "git branch -m"
  521. gbu "git branch --set-upstream-to="
  522. gbv "git branch -vv"
  523. gsm "git submodule"
  524. gsma "git submodule add"
  525. gsmi "git submodule init"
  526. gsmp "git submodule foreach git pull"
  527. gsmu "git submodule update --recursive --remote"
  528. gmg "git merge"
  529. gmga "git merge --abort"
  530. gmgs "git merge --squash"
  531. gmgts "git merge -X theirs"
  532. gmgt "git mergetool"
  533. gr "git remote -v"
  534. gra "git remote add origin"
  535. grao "git remote add orig"
  536. grag "git remote add gitea ssh://git@git.kevin-mok.com:399/Kevin-Mok/"
  537. grr "git remote remove origin"
  538. gru "git branch --set-upstream-to=origin/main main"
  539. # ]]] branch #
  540. # gt "git tag"
  541. gta "git tag -as"
  542. gtd "git tag -d"
  543. # add/remove [[[ #
  544. ga "git add -A && git status -u"
  545. # gac "git add -A && git commit -S"
  546. gac "git add -A && git commit -S --no-verify"
  547. gaf "git add -f"
  548. gal "git lfs track"
  549. # unsigned commt
  550. gacu "git add -A && git commit"
  551. glf "git lfs"
  552. # glfi "git lfs install"
  553. # glfp "git lfs pull"
  554. glfp "git lfs install && git lfs pull"
  555. glft "git lfs track *"
  556. gm "git mv"
  557. grm "git rm"
  558. grmf "git rm -f"
  559. grmc "git rm --cached"
  560. grmfc "git rm -f --cached"
  561. grmor "rm (fd -e orig --no-ignore -H)"
  562. # ]]] add/remove #
  563. # diff/log [[[ #
  564. gd "git diff -w"
  565. gdc "git diff --cached -w"
  566. gdh "git diff --cached -w HEAD~1"
  567. gds "git diff --stat"
  568. gdsc "git diff --stat --cached -w"
  569. gdt "git difftool -w --tool=vimdiff"
  570. gdtc "git difftool -w --cached --tool=vimdiff"
  571. gl "git log -5"
  572. gl1 "git log --oneline"
  573. gl1x "git log --oneline -1 | xclip -selection clipboard"
  574. gla "git log"
  575. glm "git log main"
  576. glr "git log --reverse"
  577. gqs "git-quick-stats -T"
  578. # gsl "git shortlog"
  579. gsh "git show"
  580. gshh "git show HEAD"
  581. gshs "git show --stat"
  582. # ]]] diff/log #
  583. # pull [[[ #
  584. gcl "git clone"
  585. gs "git status -u"
  586. gf "git fetch"
  587. gfa "git fetch --all"
  588. gfo "git fetch orig"
  589. gch "git checkout"
  590. gchn "git checkout -b"
  591. gchm "git checkout main"
  592. gchms "git checkout master"
  593. gchnw "git checkout -b wip"
  594. gchw "git checkout wip"
  595. gchh "git checkout HEAD --"
  596. # grss "git reset --soft HEAD~1"
  597. # grs "git reset --hard"
  598. # grso "git reset --hard origin/main"
  599. # grsh "git reset --hard HEAD"
  600. # grsh1 "git reset --hard HEAD~1"
  601. grs "git reset --soft"
  602. grs1 "git reset --soft HEAD~1"
  603. grs1c "git reset --soft HEAD~1 && git commit --amend --no-edit -S"
  604. grso "git reset --soft orig/main"
  605. grsh "git reset --hard"
  606. grsho "git reset --hard origin/main"
  607. grshh "git reset --hard HEAD"
  608. grshh1 "git reset --hard HEAD~1"
  609. # show files in git repo
  610. # gls "git ls-tree -r HEAD --name-only"
  611. gls "git ls-tree HEAD --name-only"
  612. gchp "git cherry-pick"
  613. gchpt "git cherry-pick --strategy=recursive -X theirs"
  614. gchpc "git cherry-pick --continue"
  615. gst "git stash push -m ''"
  616. gstl "git stash list"
  617. gstp "git stash pop"
  618. gsts "git stash show stash@\{0\} -p"
  619. gstcl "git stash clear"
  620. gpl "git pull --rebase"
  621. gplo "git fetch origin && git pull --rebase . origin/main"
  622. grb "git rebase -i"
  623. grba "git rebase --abort"
  624. grbc "git rebase --continue"
  625. grl "git reflog"
  626. grlc "git checkout HEAD@{1}"
  627. # ]]] pull #
  628. # push [[[ #
  629. gc "git commit -S"
  630. gcu "git commit"
  631. gca "git add -A && git commit --amend --no-edit -S"
  632. gcam "git add -A && git commit --amend -S"
  633. gcap "git add -A && git commit --amend --no-edit -S && git push --force"
  634. psgi "git add -A && git commit -m 'Update' -S && git push"
  635. gps "git push"
  636. gpso "git push origin"
  637. gpsoh "git push -f origin HEAD:"
  638. gpsg "git push gitea"
  639. gpsk "git push kevin"
  640. gpsdl "git push origin --delete"
  641. # gpsi "git config credential.helper store && git push"
  642. # gpsn "git push --set-upstream origin main"
  643. gpsn "eval (git push 2>&1 | tail -n 2)"
  644. gpsf "git push --force"
  645. gpsu "git push --set-upstream origin"
  646. # assume file unchanged
  647. gunc "git update-index --assume-unchanged"
  648. # ]]] push #
  649. # ]]] git #
  650. # coding projs [[[ #
  651. # pm "python main.py"
  652. pmn "python main.py"
  653. tld "tldr"
  654. # fsl "zathura --fork ~/coding/fastest-languages.pdf"
  655. fsl "bat ~/Documents/fastest-languages/fastest-languages.md"
  656. rgt "rg TODO"
  657. # django [[[ #
  658. # pmn "python manage.py"
  659. pm "python manage.py"
  660. pmk "python manage.py makemigrations"
  661. pmg "python manage.py migrate"
  662. # ]]] django #
  663. # make [[[ #
  664. # ma "printf '\033c' && bear make"
  665. # mc "bear make clean"
  666. # mca "bear make clean && printf '\033c' && bear make"
  667. # rmc "rm compile_commands.json"
  668. # ]]] make #
  669. # chezmoi [[[ #
  670. zm "chezmoi"
  671. za "chezmoi add"
  672. zar "chezmoi add -r"
  673. zd "chezmoi data"
  674. zdf "chezmoi diff"
  675. zp "chezmoi -v apply"
  676. # ]]] chezmoi #
  677. # spotify-lib-vis [[[ #
  678. # start spv server outside dir
  679. psv "source ../bin/activate.fish && python manage.py runserver"
  680. # open spv db in psql
  681. spvdb "psql -d spotifyvis -U django"
  682. mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv"
  683. cldb "python manage.py flush --no-input && ssv"
  684. # django shell
  685. djs "python manage.py shell"
  686. # update pip
  687. upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U"
  688. # update pip req's.
  689. ureq "pip freeze > requirements.txt"
  690. # show last history scan
  691. hlg "psql -U postgres -d spotifyvis -a -f /home/kevin/coding/spotify-lib-vis/src/scripts/queries/history.sql | rg 2021 | tac"
  692. slg "tail -n 5 $spv_dir/src/api/management/commands/update-history.log"
  693. # scan history
  694. # hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1"
  695. # removes all but newest file
  696. # rmol "ls -t | tail -n +2 | xargs rm -- && l"
  697. # snw "spotify-now -i '%artist - %title'"
  698. svd "pg_dump spotifyvis > spotifyvis.bak"
  699. # ]]] spotify-lib-vis #
  700. shc "shellcheck"
  701. tll "tllocalmgr"
  702. tli "tllocalmgr install"
  703. # tlh "tllocalmgr texhash"
  704. pdl "pdflatex"
  705. tcl "tex-clean"
  706. # grocery-finder [[[ #
  707. wl0 "watson log --all --project=309 --tag=phase2"
  708. wr0 "watson report --all --project=309 --tag=phase2"
  709. # server [[[ #
  710. no "node"
  711. noe "node --experimental-json-modules"
  712. ndm "nodemon"
  713. knd "killall node"
  714. mg "mongo"
  715. 0ht "cd ~/school/309-proj && python3 -m http.server"
  716. mgd "mongod --dbpath mongo-data"
  717. # nds "killall node && nodemon server.js"
  718. # nds "nodemon server.js"
  719. # ]]] server #
  720. # heroku [[[ #
  721. hr "heroku"
  722. hrs "heroku local web"
  723. hrt "heroku ps"
  724. hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'"
  725. gpsh "git push heroku"
  726. 0c "node collections.js"
  727. # ]]] heroku #
  728. # ]]] 309 #
  729. # mfs [[[ #
  730. pyh "python -m http.server"
  731. # j "jekyll"
  732. # js "jekyll serve"
  733. hg "hugo"
  734. hgs "hugo serve --disableFastRender"
  735. hgp "hugo server -D --disableFastRender --bind 192.168.0.10 --baseURL 'http://192.168.0.10:1313'"
  736. # ]]] mfs #
  737. ssb "ssh-bandit"
  738. rt "python ~/coding/rt-scraper/!rt-scraper.py"
  739. # ada-mario [[[ #
  740. mm "printf '\033c' && bear make clean move_mouse_with_head && ./move_mouse_with_head"
  741. med "printf '\033c' && bear make clean eye_detector && ./eye_detector"
  742. mft "printf '\033c' && bear make clean face_detector && ./face_detector"
  743. rft "~/coding/face-tracker/face_detector > /tmp/move_mouse_with_head.out"
  744. # gpsb "git push bitbucket"
  745. gpsb "git push bot"
  746. # ]]] ada-mario #
  747. sac "source ../../bin/activate.fish"
  748. dea "deactivate"
  749. whe "watch echo"
  750. nst "cp ~/Documents/workout-logs/stretching.md /tmp && nvim /tmp/stretching.md"
  751. # Red Discord bot
  752. rde "pyenv shell red-discord-bot-test"
  753. rbd "redbot --dev --debug"
  754. lo7 "libreoffice ~/Documents/expenses/2021.ods &"
  755. nps "npm start"
  756. # rarity surf [[[ #
  757. # po "python ~/coding/rarity-sniper/opensea.py | tail -n30"
  758. # po "python ~/coding/rarity-sniper/opensea.py"
  759. # poa "python ~/coding/rarity-sniper/opensea.py"
  760. # pp "python scrape.py"
  761. # pr "python rarity.py"
  762. # pu "python ~/coding/rarity-sniper/opensea.py update"
  763. po "python manage.py opensea"
  764. # pr "python manage.py rarity"
  765. bz "python manage.py rarity -t Bitz -n"
  766. pmp "python manage.py makemigrations project"
  767. srs "source ~/.venv/rarity-sniper/bin/activate.fish"
  768. yra "yarn add"
  769. yrb "yarn build"
  770. yrbs "yarn build && serve -s build"
  771. yrr "yarn remove"
  772. yrs "yarn start"
  773. sv "serve -s build"
  774. ssrr "mosh root@161.35.107.30"
  775. ssr "mosh 161.35.107.30"
  776. # ]]] rarity surf #
  777. stb "source ~/.venv/twitter-bot/bin/activate.fish"
  778. # pr "python retweet.py"
  779. prg "python retweet.py --giveaway"
  780. prm "python retweet.py --mentions | bat"
  781. # ]]] coding projs #
  782. # games [[[ #
  783. {{ if eq .chezmoi.hostname "nzxt" }}
  784. wlm "watson log --all --project=minetest"
  785. # wrm "watson report --all --project=minetest"
  786. wamv "watson start minetest +video"
  787. # minetest [[[ #
  788. mtg "minetest"
  789. mts "minetestserver"
  790. mtsc "minetestserver --gameid minetest --worldname Creative --terminal"
  791. # mtsh "minetestserver --gameid minetest --worldname Hevin --config ~/.minetest/hevin.conf --terminal"
  792. mtsh "minetestserver --gameid mineclone2 --worldname Hevin-MC --config ~/.minetest/hevin-mc.conf --terminal"
  793. mtsv "minetestserver --gameid minimal --worldname Test --terminal"
  794. # mtrsy "rsync -vr .minetest/ /mnt/linux-files/.minetest/"
  795. tet "pandoc -f markdown -t html twitch-emote-conversion.md | xclip -selection clipboard"
  796. {{ end }}
  797. # ]]] minetest #
  798. # tet "pandoc -f markdown -t html twitch-emote-conversion.md | xclip -selection clipboard"
  799. shrg "printf '¯\\\\\\\\\\_(ツ)_/¯' | xclip -selection clipboard"
  800. dcec "mono DiscordChatExporter.Cli.exe"
  801. dcec "mono DiscordChatExporter.Cli.exe export -t $DISCORD_TOKEN -c"
  802. ifm "sxiv ~/Documents/fortnite/maps/boat-campfire-slurp.png"
  803. # twitchy [[[ #
  804. tw "twitchy"
  805. twa "twitchy -a"
  806. twd "twitchy -d"
  807. tws "twitchy -s"
  808. twf "watch -n300 'twitchy-game Fortnite'"
  809. # mp "mpv --video-zoom=1.5"
  810. # ufn "source trn-api-key.fish && curl --request GET --url https://api.fortnitetracker.com/v1/profile/pc/Vole%20on%20Mobile --header 'trn-api-key: 584d8eca-30d9-4119-92d8-5067dd301118' --cookie __cfduid=d4f0daac7eee3687b481bd55dcf00f3581581900091 > stats.json"
  811. # ]]] twitchy #
  812. lob "lsd -F --group-dirs first 2020*.mkv"
  813. wob "watch -n60 'lsd -lF --group-dirs first --size short 2020*.mkv'"
  814. fnpr "t timeline FNProgress | sed -n '2p'"
  815. fnu "sxiv ~/Documents/fortnite/pics/maps/upgrade.png &"
  816. mip "ifuse /mnt/ipad"
  817. umip "fusermount -u /mnt/ipad"
  818. fd1 "fd --changed-within 1d > cp.txt"
  819. ofa "lsof | grep '101APPLE'"
  820. ttrtk "timetrace report -s 2023-04-20 -p totk"
  821. cpsdv "cp * /home/kevin/Documents/stardew-valley-sdv-saves/hevintales"
  822. # ]]] games #
  823. # school [[[ #
  824. # basic
  825. # wlf "watson log --all --tag=final"
  826. # wrf "watson report --all --tag=final"
  827. gpa "column -ts',' ~/Documents/gpa.md"
  828. ssc "mosh mokkar@teach.cs.utoronto.ca"
  829. zs "zathura --fork syllabus.pdf"
  830. pvabn "npm run serve:localhost"
  831. pvafn "npm run start:localhost"
  832. ssv "ssh -p 3022 kevin@127.0.0.1"
  833. # ]]] school #
  834. # red-hat [[[ #
  835. vpu "nmcli con up id '1 - Red Hat Global VPN' --ask"
  836. vpd "nmcli con down id '1 - Red Hat Global VPN'"
  837. loe "libreoffice ~/Documents/expenses/2021.ods &"
  838. loi "libreoffice ~/Documents/expenses/investments.ods &"
  839. # laptop
  840. # gcfr "git config user.email 'kmok@redhat.com' && git config user.signingkey 10B001347552F396"
  841. gchk "git checkout KOGITO-"
  842. gchnk "git checkout -b KOGITO-"
  843. gch3 "git checkout KOGITO-1031-diff-3"
  844. # ssh [[[ #
  845. ssw "mosh $WORK_LAPTOP_IP tmux a"
  846. ssw2 "mosh $WORK_LAPTOP_IP -- tmux a -t nzxt-2"
  847. ssi "mosh $WORK_LAPTOP_IP -- tmux a -t weechat"
  848. scw "scp $WORK_LAPTOP_IP:"
  849. sfw "sftp $WORK_LAPTOP_IP"
  850. # ]]] ssh #
  851. fp "fpaste"
  852. ghr "github-release"
  853. # oc [[[ #
  854. o "kubectl"
  855. oa "kubectl apply -f"
  856. ocr "kubectl create"
  857. ocf "kubectl create ns kogito; kubectl config set-context --current --namespace=kogito"
  858. oct "kubectx"
  859. od "kubectl describe"
  860. odd "kubectl describe deployment"
  861. odp "kubectl describe pod"
  862. odi "kubectl describe kogitoinfra"
  863. odr "kubectl describe kogitoruntime"
  864. odl "kubectl delete"
  865. odlf "kubectl delete -f"
  866. odlb "kubectl delete kogitobuild"
  867. odlc "kubectl delete configmap"
  868. odlp "kubectl delete pod"
  869. odlpj "kubectl delete project"
  870. odlr "kubectl delete kogitoruntime"
  871. oex "kubectl exec"
  872. oed "kubectl edit"
  873. og "kubectl get"
  874. oga "kubectl get all"
  875. ogd "kubectl get deployment"
  876. ogp "kubectl get pods"
  877. ogw "watch kubectl get pods"
  878. ogb "kubectl get kogitobuild"
  879. ogc "kubectl get configmap"
  880. ogi "kubectl get imagestream"
  881. ogn "kubectl get"
  882. ogr "kubectl get kogitoruntime"
  883. ogs "kubectl get service"
  884. ogsm "kubectl get servicemonitor"
  885. ol "kubectl logs -f"
  886. oli "kubectl login -u kubeadmin -p"
  887. on "kubectl new-project"
  888. op "kubectl project"
  889. opa "kubectl projects | rg kogito"
  890. opd "kubectl project default"
  891. ot "kubectl status"
  892. # ]]] oc #
  893. # jenkins [[[ #
  894. jk "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:$JENKINS_TOKEN"
  895. jkb "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:$JENKINS_TOKEN build -s -v"
  896. jkc "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:$JENKINS_TOKEN console -f"
  897. # ]]] jenkins #
  898. # maven [[[ #
  899. mvc "mvn clean"
  900. mvci "mvn clean install -Dfull"
  901. mvi "mvn install -Dfull"
  902. # mvps "mvn package -DskipTests"
  903. mvp "mvn clean package -DskipTests"
  904. mvpr "mvn clean package -DskipTests && ./server-control.sh start"
  905. # mvt "mvn test"
  906. # mvct "mvn clean test"
  907. # ]]] maven #
  908. # make [[[ #
  909. mk "make"
  910. mb4 "make before-pr"
  911. mbc "make build-cli && scp build/_output/bin/kogito $WORK_LAPTOP_IP:/home/kmok/go/bin"
  912. mc "make clean"
  913. mct "make clean test"
  914. # mi "make install"
  915. ml "make lint"
  916. mr "make run"
  917. # mt "make test"
  918. # mvet "make vet"
  919. # mvett "make vet test"
  920. mvt "make vet"
  921. mvtt "make vet test"
  922. # ]]] make #
  923. # kg "kogito"
  924. # minikube [[[ #
  925. # mb "minikube"
  926. mba "minikube start"
  927. mbd "minikube delete"
  928. mbs "minikube stop"
  929. mbt "minikube status"
  930. # ]]] minikube #
  931. # go [[[ #
  932. gor "go run"
  933. gom "DEBUG=true go run main.go"
  934. got "go test"
  935. gota "go test *"
  936. gotd "go mod tidy"
  937. # ]]] go #
  938. # docker [[[ #
  939. dk "docker"
  940. dkb "docker build"
  941. dki "docker image"
  942. dkka "docker kill \$(docker ps -q)"
  943. dkl "docker ps"
  944. dkp "docker push"
  945. dks "docker images"
  946. # ]]] docker #
  947. sb "ansible"
  948. sbp "ansible-playbook"
  949. # helm [[[ #
  950. # h "helm"
  951. hd "helm delete"
  952. hi "helm install"
  953. him "helm install --set openshift=false"
  954. ht "helm template"
  955. hu "helm upgrade"
  956. # ]]] helm #
  957. # ]]] red-hat #
  958. # tet "ticker (cat ~/Documents/expenses/etf.md) | xclip -selection clipboard"
  959. tet "ticker (xclip -o) | xclip -selection clipboard"
  960. # vpn [[[ #
  961. eip "curl ifconfig.me"
  962. fdb "firefox -P discord-"
  963. sip "curl ifconfig.me"
  964. # vpc "nordvpn connect && curl ifconfig.me"
  965. vpc "nordvpn connect"
  966. vpd "nordvpn disconnect"
  967. vpt "nordvpn status"
  968. # ]]] vpn #