Skip to content

Instantly share code, notes, and snippets.

@hoholee12
Last active August 28, 2020 12:43
Show Gist options
  • Save hoholee12/894f1c3ce584d931a0903426ae898e8a to your computer and use it in GitHub Desktop.
Save hoholee12/894f1c3ce584d931a0903426ae898e8a to your computer and use it in GitHub Desktop.
# bashrc shortcut
alias clear="echo -e \"\\x1b[2J\""
alias bashrc="nano ~/.bashrc"
# vcxsrv
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
# github shortcut
src= # your documents directory where you keep your github folder
echo "available Github projects in this machine:"
for i in $(ls $src/Github); do
echo :$i
alias "$i"="cd $src/Github/$i"
done
cd $src
# reset wsl
resetwsl(){
echo "resetting wsl"
cd /
kill -9 $(lsof | grep /mnt/c | awk '{print $2}')
sudo umount /mnt/c
sudo mount -t drvfs c:\\ /mnt/c
clear
source /etc/bash.bashrc
source ~/.bashrc 2>/dev/null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment