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.

842 lines
19 KiB

4 years ago
5 years ago
4 years ago
5 years ago
4 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
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 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
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 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. hst "history"
  8. # nft "printf '\033c' && neofetch | lolcat"
  9. nft "printf '\033c' && neofetch"
  10. fi "fish"
  11. # reload urxvt
  12. ru "xrdb ~/.Xresources && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
  13. dua "du -ah --apparent-size | sort -h"
  14. # list file sizes in megabytes with depth 1
  15. # duh "sudo du -d 1 -h --apparent-size | sort -h"
  16. # dum "sudo du -d 1 -m --apparent-size | sort -h"
  17. duh "du -d 1 -h --apparent-size | sort -h"
  18. dum "du -d 1 -m --apparent-size | sort -h"
  19. # m "man"
  20. td "tldr"
  21. # ]]] basic #
  22. # display [[[ #
  23. # nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'"
  24. xr "xrandr"
  25. {{ if eq .chezmoi.fullHostname "nzxt" }}
  26. xrn "xrandr --output HDMI-0 --rotate normal && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
  27. xrr "xrandr --output HDMI-0 --rotate right && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
  28. {{ end }}
  29. {{ if eq .chezmoi.fullHostname "x1-carbon" }}
  30. xro "xrandr --output HDMI2 --off"
  31. xrr "xrandr --output HDMI2 --auto --right-of eDP1 --scale 1.33x1.33"
  32. xrm "xrandr --output HDMI2 --auto --same-as eDP1 --scale 1.33x1.33"
  33. xrs "xrandr -s 0"
  34. {{ end }}
  35. # ]]] display #
  36. ngb "sudo nvim /etc/default/grub"
  37. mgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
  38. # a "bat"
  39. ba "bat"
  40. # ba "bat *"
  41. awkp "awk -F',' '{print \$0}'"
  42. fde "fd -e"
  43. grep "grep --color=auto -n"
  44. grpr "grep -r"
  45. rg "rg -S"
  46. rge "rg -St"
  47. # pk "pkill -f"
  48. cld "colordiff -wy --suppress-common-lines"
  49. mkpk "makepkg -sri"
  50. ex "chmod +x"
  51. lns "ln -s"
  52. src "source"
  53. # systemctl [[[ #
  54. ct "sudo systemctl"
  55. cte "sudo systemctl enable"
  56. ctd "sudo systemctl daemon-reload"
  57. ctdi "sudo systemctl disable"
  58. cta "sudo systemctl start"
  59. cts "sudo systemctl stop"
  60. ctt "sudo systemctl status"
  61. # ctr "sudo systemctl restart"
  62. ctltd "sudo systemctl status dhcpcd"
  63. ctlas "sudo systemctl start sshd"
  64. nct "sudo netctl"
  65. nctf "sudo ip link set dev wlp3s0 down"
  66. nctr "sudo systemctl restart netctl-auto@wlp4s0.service"
  67. # ]]] systemctl #
  68. # ssh [[[ #
  69. cpssh "ssh-copy-id -i ~/.ssh/id_rsa.pub"
  70. xcssh "bat ~/.ssh/id_rsa.pub | xclip -selection clipboard"
  71. # digital ocean
  72. ssd "mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a"
  73. sdh "mosh --ssh='ssh -p 399' kevin@165.22.239.234 htop"
  74. sfd "sftp -rP 399 kevin@165.22.239.234"
  75. # phone
  76. ssp "mosh --ssh='ssh -p 8022' $PHONE_IP"
  77. sfp "sftp -rP 8022 $PHONE_IP"
  78. # test server sites
  79. # svp "firefox git.ataraxy.tk khkm.tk cal.khkm.tk pste.gq smol.gq twem.tk"
  80. # postgres ssh tunnel
  81. sdt "ssh kevin@165.22.239.234 -L 5433:localhost:5432"
  82. # ]]] ssh #
  83. wh "watch"
  84. ct "crontab"
  85. cte "crontab -e"
  86. wm "sudo wifi-menu"
  87. # mounting [[[ #
  88. udm "udisksctl mount -b"
  89. udmb "udisksctl mount -b /dev/sdc2"
  90. udu "udisksctl unmount -b"
  91. udub "udisksctl unmount -b /dev/sdc2"
  92. # ]]] mounting #
  93. tch "touch"
  94. vd "vidir --verbose"
  95. # directory-related [[[ #
  96. {{ if not (eq .linux_os "termux") }}
  97. l "lsd -F --group-dirs first"
  98. la "lsd -AF --group-dirs first"
  99. ll "lsd -lF --group-dirs first --size short"
  100. llr "lsd -lF --group-dirs first --size short -tr"
  101. lla "lsd -AlF --group-dirs first --size short"
  102. {{ else }}
  103. l "ls"
  104. la "ls -a"
  105. ll "ls -l"
  106. lla "ls -al"
  107. {{ end }}
  108. cwd "echo (pwd) | xclip -selection clipboard"
  109. smv "sudo mv"
  110. f "cd"
  111. fz "fzf -e"
  112. fbg "cd ~/Pictures/Backgrounds && ranger --selectfile (fzf -e --delimiter '/' --with-nth -1)"
  113. fnd "find . -type f -name"
  114. p "pwd"
  115. rmr "rm -rf"
  116. # rmd "rm ~/Downloads/*"
  117. rmw "rm ~/.local/share/nvim/swap/"
  118. md "mkdir -p"
  119. rsy "rsync -Pr"
  120. # list all (un)mounted drives
  121. lhd "sudo fdisk -l"
  122. # get disc space for mounted drives
  123. # ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null"
  124. ds "df -h | head -n 1 && df -h | grep sd"
  125. chownw "sudo chown -R kevin:wheel"
  126. chwnm "sudo chown -R kevin:wheel /run/media/{{ .chezmoi.username }}"
  127. # cd into backup folder and show backup sizes
  128. lbu "cd /run/media/kevin/backup-hd/{{ .chezmoi.fullHostname }}/tar && lsd -l"
  129. # ]]] directory-related #
  130. # power options [[[ #
  131. s "systemctl suspend"
  132. xx "exit"
  133. so "xset dpms force off"
  134. sd "tmux kill-server; systemctl poweroff"
  135. rb "tmux kill-server; systemctl reboot"
  136. lgo "i3-msg exit"
  137. x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
  138. X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
  139. {{ if eq .chezmoi.fullHostname "x1-carbon" }}
  140. xl "xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE"
  141. XL "xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE"
  142. bt "~/linux-config/dot_config/i3blocks/scripts/executable_battery"
  143. {{ end }}
  144. # ]]] power options #
  145. # sound [[[ #
  146. {{ if eq .chezmoi.fullHostname "nzxt" }}
  147. vlm "alsamixer -c 0"
  148. vlh "alsamixer -c 2"
  149. {{ else }}
  150. vlm "alsamixer -c 1"
  151. {{ end }}
  152. # ]]] sound #
  153. # pkg management [[[ #
  154. {{ if eq .linux_os "arch" }}#[[[
  155. # pacman [[[ #
  156. # pc "sudo pacman -S"
  157. # pcq "sudo pacman -Qi"
  158. # pcr "sudo pacman -Rns"
  159. # pcud "sudo pacman -Sy"
  160. # pcug "sudo pacman -Syu"
  161. # xpc "pacman -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && pacman -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt "
  162. # ]]] pacman #
  163. # tri "trizen -S --noconfirm"
  164. tri "trizen -S --noedit"
  165. # yay [[[ #
  166. # install
  167. ya "yay -S --answerclean=None --answerdiff=None --answeredit=None"
  168. # info
  169. yaq "yay -Qi"
  170. # list files
  171. yal "yay -Ql"
  172. # remove
  173. yar "yay -Rns"
  174. # search
  175. yas "yay -Qs"
  176. # sync
  177. yau "yay -Sy"
  178. # sync and download
  179. yadl "yay -Syuw --answerclean=None --answerdiff=None --answeredit=None"
  180. # sync and update
  181. yaug "yay -Syu --answerclean=None --answerdiff=None --answeredit=None"
  182. # ]]] yay #
  183. #]]]
  184. {{ else if eq .linux_os "termux" }}#[[[
  185. pki "pkg install"
  186. pkli "pkg list-installed"
  187. pku "pkg uninstall"
  188. pks "pkg search"
  189. xpk "pkg list-installed | awk -F/ '{print \$1}' > ~/{{ .chezmoi.os }}-config/txt/termux-pkgs.txt"
  190. {{ end }}#]]]
  191. # apt [[[ #
  192. {{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
  193. ap "apt install"
  194. apr "apt remove"
  195. apu "apt upgrade"
  196. {{ end }}
  197. # ]]] apt #
  198. # ]]] pkg management #
  199. # python [[[ #
  200. py "python"
  201. py2 "python2"
  202. # pyt "printf '\033c' && pytest -vvs"
  203. pyt "clear && tmux clear-history && pytest -vvs"
  204. pyts "clear && tmux clear-history && pytest -vv"
  205. pyu "python -m unittest"
  206. pipi "pip install --user"
  207. spipi "sudo pip install"
  208. # ]]] python #
  209. # internet [[[ #
  210. pg2 "ping -c 2 -W 1 8.8.8.8"
  211. pgc "ping 8.8.8.8"
  212. dh "sudo dhcpcd"
  213. kdh "sudo killall dhcpcd"
  214. rdh "sudo killall dhcpcd && sudo dhcpcd"
  215. wgt "wget"
  216. {{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
  217. nt "nginx -t"
  218. {{ end }}
  219. # ]]] internet #
  220. whc "which"
  221. fl "file"
  222. id "identify"
  223. # rz "source ~/{{ .chezmoi.os }}-config/aliases/zsh_aliases"
  224. mst "sudo rm ~/st/config.h && sudo bear make -C ~/st install"
  225. # mst "sudo ~/st/make-st.sh"
  226. # system ]]]
  227. # applications [[[ #
  228. # silent="> /dev/null 2>&1& "
  229. 13 "rot13"
  230. am "antimicro"
  231. # task [[[ #
  232. a "task"
  233. aa "task add"
  234. aal "task add proj:lnx"
  235. aam "task add proj:ms"
  236. aamy "task add proj:mny"
  237. aap "task add proj:"
  238. aacm "task add proj:codm"
  239. aacr "task add proj:crim"
  240. aas "task add proj:sch"
  241. aa2 "task add proj:sch +c324"
  242. aa8 "task add proj:sch +c384"
  243. aay "task add proj:pey"
  244. ac "task context"
  245. acn "task context none && task"
  246. ach "task context home && task"
  247. aco "task context out && task"
  248. acs "task context sch && task"
  249. af "task proj:"
  250. afcm "task proj:codm"
  251. afcr "task proj:crim"
  252. afs "task proj:sch"
  253. afy "task proj:pey"
  254. apl "task completed"
  255. al "task limit:15"
  256. alg "task log"
  257. ans "task +next"
  258. ao "taskopen -A"
  259. asm "task summary"
  260. awt "task waiting"
  261. ay "task sync"
  262. # ]]] task #
  263. # buku [[[ #
  264. # b "buku"
  265. bd "buku -za '"
  266. bdb "sqlitebrowser ~/.local/share/buku/bookmarks.db &"
  267. bh "buku -h | bat"
  268. bi "buku --immutable 1 -zu"
  269. bo "buku -o"
  270. bp "buku -p"
  271. br "buku -zd"
  272. brp "buku --replace"
  273. bs "buku --deep -n5 -s"
  274. bsq "sqlitebrowser ~/.local/share/buku/bookmarks.db &"
  275. bsv "bukuserver run --host 127.0.0.1 --port 5001"
  276. bt "buku --deep -n5 -t"
  277. bu "buku -zu"
  278. but "buku -zu --tag"
  279. bw "buku --immutable 1 -zw -1"
  280. # ]]] buku #
  281. cc "calcurse"
  282. ccc "calcurse -D ~/.calcurse/alt-cals/class"
  283. cci "calcurse -i"
  284. ccs "calcurse-caldav"
  285. chr "google-chrome"
  286. clc "cloc ."
  287. cv "cava"
  288. dg "dragon-drag-and-drop -x"
  289. ffx "firefox"
  290. fh "feh"
  291. fi "fish"
  292. gpd "gpg --decrypt"
  293. gpe "gpg --encrypt --recipient"
  294. h "habitctl log"
  295. # hbe "habitctl edit"
  296. # hbeh "habitctl edith"
  297. htc "htop -s PERCENT_CPU"
  298. htm "htop -s PERCENT_MEM"
  299. # i "sxiv"
  300. ia "sxiv -a"
  301. it "sxiv -t *"
  302. ki "kill -9"
  303. ka "killall"
  304. kd "killall Discord && killall Discord"
  305. ke "killall electron"
  306. kf "killall firefox"
  307. kai "killall imwheel && imwheel"
  308. kt "killall thunderbird"
  309. lo "libreoffice"
  310. # mpv "mpv --volume=50"
  311. # mp "mpv"
  312. m "mpv"
  313. msf "mpv --sub-file="
  314. mra "man ranger"
  315. # mt "minetest"
  316. n "nvim"
  317. ndu "ncdu"
  318. p3 "python3"
  319. pdft "pdftotext"
  320. pipes "pipes.sh -t 3"
  321. py "python"
  322. q "qalc '"
  323. qg "qalculate-gtk"
  324. r "ranger"
  325. rbg "ranger --selectfile (grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2)"
  326. # rgc "printf '\033c' && rg"
  327. # rgc "printf '\033c' && rg"
  328. rgc "clear && tmux clear-history && rg -S"
  329. rx "redshift -x"
  330. scm "sc-im"
  331. sn "sudo nvim"
  332. sqlb "sqlitebrowser"
  333. ss "mosh"
  334. stp "termdown"
  335. # sw "swex"
  336. t "tmux"#[[[
  337. ta "tmux a -t"
  338. tacf "tmux a -t config || tmux new -s config"
  339. tacm "tmux a -t codm || tmux new -s codm"
  340. tacr "tmux a -t crimson || tmux new -s crimson"
  341. taf "tmux a -t fortnite || tmux new -s fortnite"
  342. taj "tmux a -t journal || tmux new -s journal"
  343. tarh "tmux a -t red-hat || tmux new -s red-hat"
  344. tar2 "tmux a -t red-hat-2 || tmux new -s red-hat-2"
  345. tas "tmux a -t school || tmux new -s school"
  346. tas2 "tmux a -t school-2 || tmux new -s school-2"
  347. tal "tmux a"
  348. tc "clear && tmux clear-history"
  349. tk "tmux kill-session -t"
  350. tks "tmux kill-server"
  351. tl "tmux ls"
  352. tn "tmux new -s"
  353. tnb "tmux new -s backup"
  354. #]]]
  355. usn "usernames --num 20"
  356. vmd "vimdiff"
  357. wc "wc -l"
  358. # wg "wego"
  359. wg "curl -L wthr.ml"
  360. wgm "curl -L wthr.ml/m"
  361. wgt "curl -L wthr.ml/t"
  362. ytd "youtube-dl"
  363. z "zathura --fork"
  364. lz "unzip -l"
  365. trl "tar tvzf"
  366. trx "tar xvzf"
  367. # pass [[[ #
  368. # p "pass"
  369. pc "pass -c"
  370. pe "pass edit"
  371. pi "pass insert -m"
  372. pg "pass generate -c"
  373. ps "pass show"
  374. xc "xclip -selection clipboard"
  375. yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard"
  376. yg "xclip -selection clipboard ~/.password-store/social/gmail"
  377. yt "xclip -selection clipboard ~/.password-store/social/trapbot"
  378. yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard"
  379. # ]]] pass #
  380. # watson [[[ #
  381. w "watson"
  382. # start [[[ #
  383. wa "watson start"
  384. wacm "watson start fun +cod-mobile"
  385. wae "watson start && watson edit"
  386. wad "watson add"
  387. we "watson edit"
  388. wre "watson restart"
  389. wree "watson restart && watson edit"
  390. # ]]] start #
  391. # stop [[[ #
  392. ws "watson status && watson stop"
  393. wse "watson stop && watson edit"
  394. wsc "watson cancel"
  395. wsl "watson stop && watson log --day"
  396. wt "watson status"
  397. # ]]] stop #
  398. # log/report [[[ #
  399. wl "watson log -Gcd"
  400. wla "watson log -Gcap"
  401. wlat "watson log -GcaT"
  402. ww "watson log -Gc"
  403. wwa "watson log -Gc | bat"
  404. wr "watson report -Gcd"
  405. wra "watson report -Gcap"
  406. wram "watson report -Gca | rg -S '^\w.*-\s\d*h' | sort -t' ' -hk3 | sed 's/ - /,/' | xsv table"
  407. wrat "watson report -GcaT"
  408. wrm "watson report -GcmT"
  409. wrw "watson report -Gc"
  410. # ]]] log/report #
  411. # ]]] watson #
  412. # ]]] applications #
  413. # git [[[ #
  414. g "git"
  415. gi "git init"
  416. gib "git init --bare"
  417. gstr "git config credential.helper store"
  418. gstrp "git config credential.helper store && git push"
  419. # branch [[[ #
  420. gb "git branch"
  421. gbd "git branch -D"
  422. gba "git branch --no-merged && echo '' && git branch --merged"
  423. gbu "git branch --no-merged"
  424. gbm "git branch --merged"
  425. gsm "git submodule"
  426. gsma "git submodule add"
  427. gsmi "git submodule init"
  428. gsmp "git submodule foreach git pull"
  429. gsmu "git submodule update --recursive --remote"
  430. gmg "git merge"
  431. gmgts "git merge -X theirs"
  432. gmgt "git mergetool"
  433. gr "git remote -v"
  434. gra "git remote add origin"
  435. grao "git remote add orig"
  436. # grag "git remote add gitea git@ataraxy.tk:Kevin-Mok/.git"
  437. grr "git remote remove origin"
  438. grs "git remote show origin"
  439. gru "git branch --set-upstream-to=origin/master master"
  440. # ]]] branch #
  441. # add/remove [[[ #
  442. ga "git add -A && git status -u"
  443. gac "git add -A && git commit -S"
  444. gaf "git add -f"
  445. gal "git lfs track"
  446. # unsigned commt
  447. gacu "git add -A && git commit"
  448. glf "git lfs"
  449. glfi "git lfs install"
  450. glfp "git lfs pull"
  451. glft "git lfs track *"
  452. gm "git mv"
  453. grm "git rm"
  454. grmf "git rm -f"
  455. grmc "git rm --cached"
  456. grmfc "git rm -f --cached"
  457. grmor "rm (fd -e orig --no-ignore -H)"
  458. # ]]] add/remove #
  459. # diff/log [[[ #
  460. gd "git diff -w"
  461. gdc "git diff --cached -w"
  462. gdh "git diff --cached -w HEAD~1"
  463. gds "git diff --stat"
  464. gdt "git difftool -w --tool=vimdiff"
  465. gdtc "git difftool -w --cached --tool=vimdiff"
  466. gl "git log"
  467. glm "git log master"
  468. # gsl "git shortlog"
  469. # ]]] diff/log #
  470. # pull [[[ #
  471. gcl "git clone"
  472. gs "git status -u"
  473. gf "git fetch origin"
  474. gfo "git fetch orig"
  475. gfg "git fetch gitea"
  476. gch "git checkout"
  477. gchn "git checkout -b"
  478. gchm "git checkout master"
  479. gchnw "git checkout -b wip"
  480. gchw "git checkout wip"
  481. gchh "git checkout HEAD --"
  482. grom "git reset --hard origin/master"
  483. gheadm1 "git reset --hard HEAD~1"
  484. # show files in git repo
  485. # gls "git ls-tree -r HEAD --name-only"
  486. gls "git ls-tree HEAD --name-only"
  487. gchp "git cherry-pick"
  488. gchpt "git cherry-pick --strategy=recursive -X theirs"
  489. gchpc "git cherry-pick --continue"
  490. gst "git stash"
  491. gstl "git stash list"
  492. gstp "git stash pop"
  493. gsts "git stash show stash@\{0\} -p"
  494. gclear "git stash clear"
  495. gpl "git pull --rebase"
  496. gplo "git fetch orig && git pull --rebase . orig/master"
  497. grb "git rebase -i"
  498. grba "git rebase --abort"
  499. grbc "git rebase --continue"
  500. # ]]] pull #
  501. # push [[[ #
  502. gc "git commit -S"
  503. gcu "git commit"
  504. gca "git add -A && git commit --amend --no-edit -S"
  505. gcam "git add -A && git commit --amend -S"
  506. gcap "git add -A && git commit --amend --no-edit -S && git push --force"
  507. psgi "git add -A && git commit -m 'Update' -S && git push"
  508. gps "git push"
  509. gpsg "git push gitea"
  510. # gpsi "git config credential.helper store && git push"
  511. # gpsn "git push --set-upstream origin master"
  512. gpsn "eval (git push 2>&1 | tail -n 2)"
  513. gpsf "git push --force"
  514. # assume file unchanged
  515. gunc "git update-index --assume-unchanged"
  516. # ]]] push #
  517. # ]]] git #
  518. # coding projs [[[ #
  519. tld "tldr"
  520. # fsl "zathura --fork ~/coding/fastest-languages.pdf"
  521. fsl "bat ~/Documents/fastest-languages/fastest-languages.md"
  522. rgt "rg TODO"
  523. # make [[[ #
  524. ma "printf '\033c' && bear make"
  525. mc "bear make clean"
  526. mca "bear make clean && printf '\033c' && bear make"
  527. rmc "rm compile_commands.json"
  528. # ]]] make #
  529. # chezmoi [[[ #
  530. zm "chezmoi"
  531. za "chezmoi add"
  532. zar "chezmoi add -r"
  533. zd "chezmoi data"
  534. zdf "chezmoi diff"
  535. zp "chezmoi -v apply"
  536. # ]]] chezmoi #
  537. # spotify-lib-vis [[[ #
  538. # start spv server outside dir
  539. ssv "source ../bin/activate.fish && python manage.py runserver"
  540. # open spv db in psql
  541. spvdb "psql -d spotifyvis -U django"
  542. mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv"
  543. cldb "python manage.py flush --no-input && ssv"
  544. # django shell
  545. djs "python manage.py shell"
  546. # update pip
  547. upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U"
  548. # update pip req's.
  549. ureq "pip freeze > requirements.txt"
  550. # show last history scan
  551. hlg "psql -U postgres -d spotifyvis -a -f /home/kevin/coding/spotify-lib-vis/src/scripts/queries/history.sql | rg 2020 | tac"
  552. slg "tail -n 5 $spv_dir/src/api/management/commands/update-history.log"
  553. # scan history
  554. # hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1"
  555. # removes all but newest file
  556. # rmol "ls -t | tail -n +2 | xargs rm -- && l"
  557. # snw "spotify-now -i '%artist - %title'"
  558. svd "pg_dump spotifyvis > spotifyvis.bak"
  559. # ]]] spotify-lib-vis #
  560. shc "shellcheck"
  561. tll "tllocalmgr"
  562. tli "tllocalmgr install"
  563. # tlh "tllocalmgr texhash"
  564. pdl "pdflatex"
  565. tcl "tex-clean"
  566. # grocery-finder [[[ #
  567. wl0 "watson log --all --project=309 --tag=phase2"
  568. wr0 "watson report --all --project=309 --tag=phase2"
  569. # server [[[ #
  570. no "node"
  571. ndm "nodemon"
  572. knd "killall node"
  573. mg "mongo"
  574. 0ht "cd ~/school/309-proj && python3 -m http.server"
  575. mgd "mongod --dbpath mongo-data"
  576. # nds "killall node && nodemon server.js"
  577. nds "nodemon server.js"
  578. # ]]] server #
  579. # heroku [[[ #
  580. hr "heroku"
  581. hrs "heroku local web"
  582. hrt "heroku ps"
  583. hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'"
  584. gpsh "git push heroku"
  585. 0c "node collections.js"
  586. # ]]] heroku #
  587. # ]]] 309 #
  588. # mfs [[[ #
  589. pyh "python -m http.server"
  590. # j "jekyll"
  591. # js "jekyll serve"
  592. hu "hugo"
  593. hg "hugo serve --disableFastRender"
  594. hgp "hugo server -D --disableFastRender --bind 192.168.0.10 --baseURL 'http://192.168.0.10:1313'"
  595. # ]]] mfs #
  596. ssb "ssh-bandit"
  597. rt "python ~/coding/rt-scraper/!rt-scraper.py"
  598. # ada-mario [[[ #
  599. mm "printf '\033c' && bear make clean move_mouse_with_head && ./move_mouse_with_head"
  600. med "printf '\033c' && bear make clean eye_detector && ./eye_detector"
  601. mft "printf '\033c' && bear make clean face_detector && ./face_detector"
  602. rft "~/coding/face-tracker/face_detector > /tmp/move_mouse_with_head.out"
  603. gpsb "git push bitbucket"
  604. # ]]] ada-mario #
  605. sac "source ../../bin/activate.fish"
  606. dea "deactivate"
  607. whe "watch echo"
  608. nst "cp ~/Documents/workout-logs/stretching.md /tmp && nvim /tmp/stretching.md"
  609. # Red Discord bot
  610. rde "pyenv shell red-discord-bot-test"
  611. rbd "redbot --dev --debug"
  612. # ]]] coding projs #
  613. # games [[[ #
  614. wlm "watson log --all --project=minetest"
  615. # wrm "watson report --all --project=minetest"
  616. wamv "watson start minetest +video"
  617. # minetest [[[ #
  618. mtg "minetest"
  619. mts "minetestserver"
  620. mtsc "minetestserver --gameid minetest --worldname Creative --terminal"
  621. # mtsh "minetestserver --gameid minetest --worldname Hevin --config ~/.minetest/hevin.conf --terminal"
  622. mtsh "minetestserver --gameid mineclone2 --worldname Hevin-MC --config ~/.minetest/hevin-mc.conf --terminal"
  623. mtsv "minetestserver --gameid minimal --worldname Test --terminal"
  624. # mtrsy "rsync -vr .minetest/ /mnt/linux-files/.minetest/"
  625. # ]]] minetest #
  626. tet "pandoc -f markdown -t html twitch-emote-conversion.md | xclip -selection clipboard"
  627. shrg "printf '¯\\\\\\\\\\_(ツ)_/¯' | xclip -selection clipboard"
  628. dcec "mono DiscordChatExporter.Cli.exe"
  629. dcec "mono DiscordChatExporter.Cli.exe export -t $DISCORD_TOKEN -c"
  630. ifm "sxiv ~/Documents/fortnite/maps/boat-campfire-slurp.png"
  631. tw "twitchy"
  632. twa "twitchy -a"
  633. twd "twitchy -d"
  634. tws "twitchy -s"
  635. twf "watch -n300 'twitchy-game Fortnite'"
  636. # mp "mpv --video-zoom=1.5"
  637. # 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"
  638. # ]]] games #
  639. # school [[[ #
  640. # basic
  641. # wlf "watson log --all --tag=final"
  642. # wrf "watson report --all --tag=final"
  643. gpa "column -ts',' ~/Documents/gpa.md"
  644. ssc "mosh mokkar@teach.cs.utoronto.ca"
  645. # ]]] school #
  646. # red-hat [[[ #
  647. # laptop
  648. loe "libreoffice ~/Documents/expenses/2020.ods &"
  649. ssw "mosh $WORK_LAPTOP_IP tmux a"
  650. ssi "mosh $WORK_LAPTOP_IP -- tmux a -t weechat"
  651. sfw "sftp $WORK_LAPTOP_IP"
  652. fp "fpaste"
  653. ghr "github-release"
  654. # oc [[[ #
  655. o "oc"
  656. odc "oc describe pod"
  657. odl "oc delete project"
  658. og "oc get pods -w"
  659. ol "oc logs"
  660. on "oc new-project"
  661. op "oc project"
  662. opd "oc project default"
  663. ot "oc status"
  664. # ]]] oc #
  665. jk "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:112ef7228e7a8cea5435473f9416cb56e1"
  666. # ]]] red-hat #