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.

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