Skip to content

Instantly share code, notes, and snippets.

@sizhky
Last active July 4, 2023 10:56
Show Gist options
  • Save sizhky/6949866736e7ef93ce52f471d9275546 to your computer and use it in GitHub Desktop.
Save sizhky/6949866736e7ef93ce52f471d9275546 to your computer and use it in GitHub Desktop.
bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
. /home/yeshwanth/torch/install/bin/torch-activate
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/
export CUDA_VISIBLE_DEVICES=1
#export CUDA_VISIBLE_DEVICES=""
#print contents after moving to given directory
ccd()
{
builtin cd "$@"
}
cd() {
command cd "$@"
if [ "$(ls -A | wc -l)" -lt 100 ]; then
ls
fi
}
# added by Anaconda3 4.4.0 installer
# export PATH="/home/yeshwanth/anaconda3/bin:$PATH"
https://www.nathankowald.com/blog/2014/03/tmux-attach-session-alias/
alias tm="tmux ls"
alias tma='tmux attach -t $1' ## find at https://www.nathankowald.com/blog/2014/03/tmux-attach-session-alias/
if [ -f ~/.etc/bash_completion.d/tma ]; then
. ~/.etc/bash_completion.d/tma
fi
alias tmn='tmux new-session -s $t'
alias tmk='tmux kill-session -t $t'
if [ -f ~/.etc/bash_completion.d/tmk ]; then
. ~/.etc/bash_completion.d/tma
fi
alias quitjupyter="kill $(pgrep jupyter)"
alias viewp="ps -o user= -p $1"
alias killp="kill -9 $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment