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.

814 lines
19 KiB

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