# Edit by X-Legend
if ! type function_loaded &> /dev/null; then
	. $HOME/.gamerc
fi
alias ls="ls --color=auto"
alias l.="ls -d .* --color=auto"
alias ll="ls -l --color=auto"
alias grep="grep --color"
alias egrep="grep -E --color"
alias iptables="sudo iptables"
alias lls8="ls -hltra | sort -t ' ' -k8"
alias lls9="ls -hltra | sort -t ' ' -k9"

alias historypatch="history | grep -v grep | grep --color 'TestCtrl patch TEST'"
alias grep="grep --color"
alias ip_out='curl -s icanhazip.com'
alias ip_in="/sbin/ifconfig ens4 | grep 'inet' | grep -v 'inet6' | awk -F' ' '{print \$2}' | awk '{print \$1}'"

# Useful Tool
alias twolevel_comma="sed 's/\\x01/,/g'"
alias comma_count="awk -F',' ' { print NF-1 } '"
alias logfmt="sed 's/^/\"/;s/$/\",/' | tr \"\\n\" \" \" | sed 's/^/\"log\", /;s/, $//'"
alias str_length="expr length"
alias history_gcp_upload="history | grep gsutil; cd ~/servers*/Log; ls"

# Add asan server debug parameters
export ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-16/bin/llvm-symbolizer
export ASAN_OPTIONS=disable_coredump=0:log_path=./asan.log:detect_leaks=0:exitcode=0:detect_container_overflow=0:detect_odr_violation=0:use_sigaltstack=false
