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.

84 lines
1.7 KiB

  1. in_lab=false
  2. cd_school="d ~/Documents/School";
  3. if [ -d "/h/u3/c7/" ]; then
  4. TERM=xterm-256color
  5. xmodmap -e "clear Lock"
  6. in_lab=true
  7. cd_school="d ~";
  8. fi
  9. if $in_lab; then
  10. ff() { firefox $1 ; }
  11. zip() { tar -zcvf $1.tar.gz $1/ ; }
  12. alias nau="nautilus ."
  13. fi
  14. # school
  15. alias sch="$cd_school"
  16. alias 236="$cd_school/236"
  17. alias psy="$cd_school/psy"
  18. pdl() { pdflatex $1 ; }
  19. cptp() {
  20. cp template.tex cp-template.tex
  21. chmod 600 cp-template.tex
  22. date=`date +%-m-%d`
  23. mv cp-template.tex "$date".tex
  24. }
  25. # 136
  26. alias 136="$cd_school/136"
  27. alias 136n="$cd_school/136/notes"
  28. alias pr2="$cd_school/136/par/2"
  29. # 209
  30. alias ll="ls -l"
  31. alias 209="$cd_school/209"
  32. alias 9r="$cd_school/209/mokkar"
  33. alias l4="$cd_school/209/mokkar/lab4"
  34. alias a1="$cd_school/209/mokkar/a1"
  35. # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
  36. alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
  37. # compile without running
  38. c9() {
  39. gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm
  40. }
  41. # compile without running
  42. c9a() {
  43. for file in *
  44. do
  45. if [[ $file = *.c ]]; then
  46. gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file"
  47. fi
  48. done
  49. }
  50. # compile and run
  51. c9r() {
  52. gc9 $1
  53. ./"${1%.*}.out"
  54. }
  55. # compile and run with input
  56. c9i() {
  57. gc9 $1
  58. ./"${1%.*}.out" < $2
  59. }
  60. # compile and run with input file
  61. run() {
  62. while read line
  63. do
  64. ./$1 $line
  65. done < $2
  66. }
  67. mkex() { chmod 700 $1 ; }
  68. # temp
  69. # compile a1p2 and test with simple case
  70. ca12() {
  71. gcc -Wall -std=gnu99 -g -o validate_sin.out validate_sin.c sin_helpers.c
  72. ./validate_sin.out 810620716
  73. }
  74. # compile a1p1 and test with simple case
  75. ca1() {
  76. gcc -Wall -std=gnu99 -g -o count_large.out count_large.c
  77. # ll | ./count_large.out 4000
  78. ./count_large.out 0 rw------- < ll.txt
  79. }