# 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="ip -4 addr show | grep -v '127.0.0.1' | grep 'inet ' | head -1 | awk '{print \$2}' | cut -d/ -f1"

# 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"
alias cm644="chmod 644"
alias cm755="chmod 755"

# Add asan server debug parameters
export ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-19/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
