Merge branch 'master' of github.com:hykilpikonna/zshrc

This commit is contained in:
Azalea
2023-05-28 12:59:31 -07:00
3 changed files with 36 additions and 21 deletions
+17 -18
View File
@@ -1,20 +1,19 @@
Host daisy-root
HostName daisy.hydev.org
Host gcr
HostName hydev-ms-gcr
User REDMOND.t-azaleagui
Host star
HostName star
User root
Host home
HostName home.hydev.org
Port 10022
Host aster
HostName hydev-aster
User hykilpikonna
Host ovh
HostName ovh.hydev.org
User root
Host aster
HostName aster.hydev.org
User azalea
Host daisy
HostName daisy.hydev.org
User azalea
@@ -23,14 +22,6 @@ Host cn
HostName cn.hydev.org
User root
Host nix
HostName nix.hydev.org
User root
Host us
HostName us.hydev.org
User root
Host lux
HostName lux.hydev.org
User root
@@ -41,6 +32,10 @@ Host mir4
KexAlgorithms +diffie-hellman-group1-sha1
Cipher 3des-cbc
Host orangepi3
HostName orangepi3
User root
Host caspase
HostName caspase3kjq.terra-incognita.dev
User kevingaojx
@@ -53,4 +48,8 @@ Host ut-343
HostName dbsrv1.teach.cs.toronto.edu
Host ut-cs
HostName teach.cs.toronto.edu
HostName teach.cs.toronto.edu
# Fig ssh integration. Keep at the bottom of this file.
Match all
Include ~/.fig/ssh
+4
View File
@@ -23,6 +23,10 @@ mamba-init()
# Auto init mamba
if command -v 'micromamba' &> /dev/null; then
mamba-init
if ! command -v 'conda' &> /dev/null; then
alias conda="mamba"
fi
fi
# Pyenv
+15 -3
View File
@@ -57,6 +57,7 @@ alias rm='rm -ir'
alias mkdirs='mkdir -p'
alias ports='netstat -tulpn | grep LISTEN'
alias suports='sudo netstat -tulpn | grep LISTEN'
alias findtxt='grep -IHrnws --exclude=\*.log -s '/' -e'
alias cls='clear'
@@ -69,7 +70,7 @@ alias sortsize='sort -hr'
alias dus='du -shc * | sortsize'
alias dusa='du -hc --max-depth=1 | sortsize'
alias ts='tailscale'
alias ts='sudo tailscale'
alias ts-install='curl -fsSL https://tailscale.com/install.sh | sh'
alias vsucode='sudo code --user-data-dir /root/.config/vscode --no-sandbox'
@@ -107,10 +108,13 @@ upload-daisy() {
# Automatic sudo
alias sctl="sudo systemctl"
alias sctlu="systemctl --user"
alias jctl="sudo journalctl"
alias ufw="sudo ufw"
alias nginx="sudo nginx"
alias certbot="sudo certbot"
alias apt="sudo apt"
alias dpkg="sudo dpkg"
has() {
command -v "$1" &> /dev/null
@@ -140,12 +144,19 @@ else
fi
# Gradle with auto environment detection
[[ -z $GRADLE ]] && GRADLE="$(which gradle)"
if [[ -z $GRADLE ]] && command -v 'gradle' &> /dev/null; then
GRADLE="$(which gradle)"
fi
gradle() {
if [[ -f "./gradlew" ]]; then
./gradlew "$@"
else
$GRADLE "$@"
if [[ -z $GRADLE ]]; then
echo "Neither gradle nor ./gradlew is found, please install it and restart zsh."
else
$GRADLE "$@"
fi
fi
}
@@ -157,6 +168,7 @@ reset-permissions-dangerous() {
export PATH="$SCR/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
# Lisp wrapper
lisp() {