update git history
This commit is contained in:
2
aliases
2
aliases
@@ -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
|
||||||
|
|||||||
31
functions
31
functions
@@ -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)
|
||||||
elif [ "$OSTYPE" = "Darwin" ]; then
|
if [ "$ROUTR" != "" ]; then
|
||||||
NET=$(system_profiler SPNetworkDataType | grep "Router:" | cut -c 19-30 | head -1)
|
WANIP=$(timeout 0.25s curl -s ipv4.icanhazip.com)
|
||||||
IP=$(ifconfig | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f2)
|
fi
|
||||||
|
elif [ "$OSTYPE" = "Darwin" ]; then
|
||||||
|
ROUTR=$(system_profiler SPNetworkDataType | grep "Router:" | cut -c 19-30 | head -1)
|
||||||
|
LANIP=$(ifconfig | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f2)
|
||||||
|
if [ "$ROUTR" != "" ]; then
|
||||||
|
WANIP=$(gtimeout 0.25s curl -s ipv4.icanhazip.com)
|
||||||
fi
|
fi
|
||||||
if [ "$NET" != "" ]; then
|
|
||||||
GW=$(curl -s icanhazip.com)
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
2
zshrc
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user