Last active
August 28, 2020 12:43
-
-
Save hoholee12/894f1c3ce584d931a0903426ae898e8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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