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.

57 lines
1.3 KiB

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