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.

48 lines
1.1 KiB

  1. alias ll="ls -l"
  2. alias 209="$cd_school/209"
  3. alias 9r="$cd_school/209/mokkar"
  4. alias l4="$cd_school/209/mokkar/lab4"
  5. alias a1="$cd_school/209/mokkar/a1"
  6. # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
  7. alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
  8. mkex() { chmod 700 $1 ; }
  9. ## compilation functions
  10. # compile without running
  11. c9() { gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm ; }
  12. # compile without running
  13. c9a() {
  14. for file in *; do
  15. if [[ $file = *.c ]]; then
  16. gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file"
  17. fi
  18. done
  19. }
  20. # compile and run
  21. c9r() { gc9 $1 && ./"${1%.*}.out" ; }
  22. # compile and run with input
  23. c9i() { gc9 $1 && ./"${1%.*}.out" < $2 ; }
  24. # compile and run with input file
  25. run() {
  26. while read line; do
  27. ./$1 $line
  28. done < $2
  29. }
  30. # compile a1p2 and test with simple case
  31. ca12() {
  32. gcc -Wall -std=gnu99 -g -o validate_sin.out validate_sin.c sin_helpers.c
  33. ./validate_sin.out 810620716
  34. }
  35. # compile a1p1 and test with simple case
  36. ca1() {
  37. gcc -Wall -std=gnu99 -g -o count_large.out count_large.c
  38. # ll | ./count_large.out 4000
  39. ./count_large.out 0 rw------- < ll.txt
  40. }