From 1183e2af5f3801d24ad0863b8b65929c5c4e0881 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Fri, 7 Apr 2023 18:23:50 -0400 Subject: [PATCH 01/10] [O] Replace conda with mamba if conda doens't exist --- scripts/includes/conda.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/includes/conda.sh b/scripts/includes/conda.sh index 8d20212..702e29e 100644 --- a/scripts/includes/conda.sh +++ b/scripts/includes/conda.sh @@ -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 From b60ad6a774a8af717873e00a23f11444ebf7c39a Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Fri, 7 Apr 2023 18:24:04 -0400 Subject: [PATCH 02/10] [+] Add cargo bin --- scripts/zshrc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index 3694e73..ec911d0 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -129,6 +129,7 @@ reset-permissions-dangerous() { export PATH="$SCR/bin:$PATH" export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.cargo/bin:$PATH" # Lisp wrapper lisp() { From 2e1ba2c5a92e2bad8194bf7a7987e11442d8dbd3 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Fri, 7 Apr 2023 18:26:17 -0400 Subject: [PATCH 03/10] [U] Update ssh config --- config-sync/ssh-config | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/config-sync/ssh-config b/config-sync/ssh-config index 871cc4a..673fb72 100644 --- a/config-sync/ssh-config +++ b/config-sync/ssh-config @@ -1,20 +1,11 @@ -Host daisy-root - HostName daisy.hydev.org - 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 +14,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 +24,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 +40,8 @@ Host ut-343 HostName dbsrv1.teach.cs.toronto.edu Host ut-cs - HostName teach.cs.toronto.edu \ No newline at end of file + HostName teach.cs.toronto.edu + +# Fig ssh integration. Keep at the bottom of this file. +Match all + Include ~/.fig/ssh From cbbaa28280c08a93ee9a1d758bf04f92550f2937 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Fri, 7 Apr 2023 18:30:02 -0400 Subject: [PATCH 04/10] [F] Fix gradle detection --- scripts/zshrc.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index ec911d0..2aa12e9 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -112,14 +112,16 @@ alias ufw="sudo ufw" alias nginx="sudo nginx" # Gradle with auto environment detection -[[ -z $GRADLE ]] && GRADLE="$(which gradle)" -gradle() { - if [[ -f "./gradlew" ]]; then - ./gradlew "$@" - else - $GRADLE "$@" - fi -} +if command -v 'gradle' &> /dev/null; then + [[ -z $GRADLE ]] && GRADLE="$(which gradle)" + gradle() { + if [[ -f "./gradlew" ]]; then + ./gradlew "$@" + else + $GRADLE "$@" + fi + } +fi # Unix permissions reset (Dangerous! This will make executable files no longer executable) reset-permissions-dangerous() { From 9a96b1d7d279866a4abfb63ad58aedcb56195e37 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Fri, 7 Apr 2023 18:31:08 -0400 Subject: [PATCH 05/10] [F] Fix gradle detection --- scripts/zshrc.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index 2aa12e9..8ef30c9 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -112,17 +112,22 @@ alias ufw="sudo ufw" alias nginx="sudo nginx" # Gradle with auto environment detection -if command -v 'gradle' &> /dev/null; then - [[ -z $GRADLE ]] && GRADLE="$(which gradle)" - gradle() { - if [[ -f "./gradlew" ]]; then - ./gradlew "$@" - else - $GRADLE "$@" - fi - } +if [[ -z $GRADLE ]]; then + if command -v 'gradle' &> /dev/null; then + GRADLE="$(which gradle)" + else + GRADLE="gradle" + fi fi +gradle() { + if [[ -f "./gradlew" ]]; then + ./gradlew "$@" + else + $GRADLE "$@" + fi +} + # Unix permissions reset (Dangerous! This will make executable files no longer executable) reset-permissions-dangerous() { sudo find . -type d -exec chmod 755 {} \; From eb52bdddd4b30b586324f713acdbb2b990e820f8 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Fri, 7 Apr 2023 18:33:45 -0400 Subject: [PATCH 06/10] [F] Fix gradle --- scripts/zshrc.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index 8ef30c9..838317b 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -124,7 +124,11 @@ 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 } From c80af33bcb124942407377755e1bddbd862491e2 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Fri, 7 Apr 2023 18:36:19 -0400 Subject: [PATCH 07/10] [F] Fix gradle --- scripts/zshrc.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index 838317b..af30764 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -112,12 +112,8 @@ alias ufw="sudo ufw" alias nginx="sudo nginx" # Gradle with auto environment detection -if [[ -z $GRADLE ]]; then - if command -v 'gradle' &> /dev/null; then - GRADLE="$(which gradle)" - else - GRADLE="gradle" - fi +if [[ -z $GRADLE ]] && command -v 'gradle' &> /dev/null; then + GRADLE="$(which gradle)" fi gradle() { From a79ca14b12a0867f26d51bec160f1b0a934be9f1 Mon Sep 17 00:00:00 2001 From: Azalea Date: Sun, 28 May 2023 16:45:14 +0000 Subject: [PATCH 08/10] [+] Ubuntu --- scripts/zshrc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index af30764..a05e959 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -69,7 +69,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,9 +107,12 @@ 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 apt="sudo apt" +alias dpkg="sudo dpkg" # Gradle with auto environment detection if [[ -z $GRADLE ]] && command -v 'gradle' &> /dev/null; then From b2dc14771e7f47bfd2b09dec512054257c91a0b9 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Sun, 28 May 2023 13:10:54 -0400 Subject: [PATCH 09/10] [+] suports --- scripts/zshrc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index af30764..3176838 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -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' From dcc38e084827311eda42e339af47ca71acd118cc Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Sun, 28 May 2023 15:56:08 -0400 Subject: [PATCH 10/10] [+] ssh config --- config-sync/ssh-config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config-sync/ssh-config b/config-sync/ssh-config index 673fb72..31bb4b7 100644 --- a/config-sync/ssh-config +++ b/config-sync/ssh-config @@ -1,3 +1,11 @@ +Host gcr + HostName hydev-ms-gcr + User REDMOND.t-azaleagui + +Host star + HostName star + User root + Host aster HostName hydev-aster User hykilpikonna