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.6 KiB
84 lines
1.6 KiB
in_lab=false
|
|
cd_school="d ~/Documents/School/notes";
|
|
|
|
# Lab Setup/Aliases {{{
|
|
if [ $(whoami) == "mokkar" ]; then
|
|
TERM=xterm-256color
|
|
xmodmap -e "clear Lock"
|
|
in_lab=true
|
|
cd_school="d ~";
|
|
|
|
ff() { firefox $1 ; }
|
|
zip() { tar -zcvf $1.tar.gz $1/ ; }
|
|
alias nau="nautilus ."
|
|
fi
|
|
# }}}
|
|
|
|
# General {{{
|
|
alias sch="$cd_school"
|
|
alias 236="$cd_school/236"
|
|
alias psy="$cd_school/psy"
|
|
alias rml="rm *.aux *.log *.pdf"
|
|
pdl() { pdflatex $1 ; }
|
|
cptp() {
|
|
cp *template.tex cp-template.tex
|
|
chmod 600 cp-template.tex
|
|
date=`date +%-m-%d`
|
|
mv cp-template.tex "$date".tex
|
|
}
|
|
# }}}
|
|
|
|
# 136 {{{
|
|
alias 136="$cd_school/136"
|
|
alias 136l="$cd_school/136/lecture"
|
|
alias pr3="$cd_school/136/par/3"
|
|
# }}}
|
|
|
|
# 209 {{{
|
|
alias ll="ls -l"
|
|
|
|
# General {{{
|
|
cd_209="d ~/Documents/School/209";
|
|
alias 209="$cd_209"
|
|
alias 9r="$cd_209/mokkar"
|
|
alias l6="$cd_209/mokkar/lab6"
|
|
alias 9a="$cd_209/mokkar/a2"
|
|
# alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
|
|
alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
|
|
mkex() { chmod 777 $1 ; }
|
|
# }}}
|
|
|
|
# {{{ Compilation Functions
|
|
# compile without running
|
|
c9() { gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm ; }
|
|
|
|
# compile all without running
|
|
c9a() {
|
|
for file in *; do
|
|
if [[ $file = *.c ]]; then
|
|
gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file"
|
|
fi
|
|
done
|
|
}
|
|
|
|
# compile and run
|
|
c9r() { c9 $1 && ./"${1%.*}.out" ; }
|
|
|
|
# compile and run with input
|
|
c9i() { c9 $1 && ./"${1%.*}.out" < $2 ; }
|
|
|
|
# compile and run with input file
|
|
run() {
|
|
while read line; do
|
|
# ./$1.out $line
|
|
echo ./$1.out $line
|
|
done < $1.in
|
|
}
|
|
# temp
|
|
deb() {
|
|
gdb ./print_ptree.out < "$1"
|
|
}
|
|
# }}}
|
|
# }}}
|
|
|
|
alias 36a="$cd_school/236/a1"
|