update git history

This commit is contained in:
Stephen
2021-03-08 22:04:35 -08:00
parent 4d87c74a0d
commit a807614e61
4 changed files with 22 additions and 15 deletions

View File

@@ -18,7 +18,7 @@ alias tn="tmux new-session -s"
alias gcc="gcc -g" alias gcc="gcc -g"
alias hora='date "+%H:%M:%S"' alias hora='date "+%H:%M:%S"'
alias wthr='curl wttr.in/san_luis_obispo' alias wthr='curl wttr.in/san_luis_obispo'
alias nf='cl; neofetch; shownetinfo && lab && batt' alias nf='cl; neofetch; shownetinfo && batt'
alias servers='python3 /Users/smparkin/Development/server_stats/servers.py' alias servers='python3 /Users/smparkin/Development/server_stats/servers.py'
# School # School

View File

@@ -1,25 +1,28 @@
function shownetinfo() { function shownetinfo() {
OSTYPE=$(uname -s) OSTYPE=$(uname -s)
IP="" LANIP=""
GW="" WANIP=""
NET="" ROUTR=""
if [ "$OSTYPE" = "Linux" ]; then if [ "$OSTYPE" = "Linux" ]; then
IP=$(ip addr show | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f6 | cut -d "/" -f1) LANIP=$(ip addr show | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f6 | cut -d "/" -f1)
NET=$(ip route | grep default | cut -d " " -f3) ROUTR=$(ip route | grep default | cut -d " " -f3)
if [ "$ROUTR" != "" ]; then
WANIP=$(timeout 0.25s curl -s ipv4.icanhazip.com)
fi
elif [ "$OSTYPE" = "Darwin" ]; then elif [ "$OSTYPE" = "Darwin" ]; then
NET=$(system_profiler SPNetworkDataType | grep "Router:" | cut -c 19-30 | head -1) ROUTR=$(system_profiler SPNetworkDataType | grep "Router:" | cut -c 19-30 | head -1)
IP=$(ifconfig | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f2) LANIP=$(ifconfig | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f2)
fi if [ "$ROUTR" != "" ]; then
if [ "$NET" != "" ]; then WANIP=$(gtimeout 0.25s curl -s ipv4.icanhazip.com)
GW=$(curl -s icanhazip.com) fi
fi fi
tput setaf 7; tput bold; echo -en "Net: " tput setaf 7; tput bold; echo -en "Net: "
tput sgr0 tput sgr0
tput setaf 7; echo -en "internal $IP" tput setaf 7; echo -en "internal $LANIP"
if [ "$NET" != "" ]; then if [ "$ROUTR" != "" ]; then
echo -en ", external $GW" echo -en ", external $WANIP"
echo -en ", router $NET" echo -en ", router $ROUTR"
fi fi
tput sgr0 tput sgr0
} }

View File

@@ -8,3 +8,5 @@
email = smparkin@calpoly.edu email = smparkin@calpoly.edu
[core] [core]
excludesfile = ~/.gitignore_global excludesfile = ~/.gitignore_global
[pull]
rebase = false

2
zshrc
View File

@@ -45,7 +45,9 @@ if [ "$OSTYPE" = "Darwin" ]; then
if [ "$ARCH" = "arm64" ]; then if [ "$ARCH" = "arm64" ]; then
export PATH="/opt/homebrew/bin:$PATH" export PATH="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH" export PATH="/opt/homebrew/sbin:$PATH"
export PATH="/Users/smparkin/Library/Python/3.9/bin:$PATH"
elif [ "$ARCH" = "x86_64" ]; then elif [ "$ARCH" = "x86_64" ]; then
export PATH="/usr/local/bin:$PATH" export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
fi fi
fi fi