diff --git a/caddy-install.sh b/caddy-install.sh index 41b0a99..8f11769 100644 --- a/caddy-install.sh +++ b/caddy-install.sh @@ -6,5 +6,6 @@ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo sudo apt update sudo apt install caddy +echo echo Certificates will be saved automatically in ~/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/ echo Config file of caddy started by systemctl : /etc/caddy/Caddyfile diff --git a/git-config.sh b/git-config.sh index 1eb2bb8..27fa016 100755 --- a/git-config.sh +++ b/git-config.sh @@ -47,7 +47,8 @@ then fi echo "---------------------------------------------" -echo "Path to global gitignore file? (For example ~/.gitignore.global.txt, leave blank for no change)" +echo "Current global gitignore file = $(git config --get core.excludesfile)" +echo "Set [path to global gitignore file]? (leave blank for no change)" read -p "***:: " ExcludesFile if [ $ExcludesFile ] then @@ -65,3 +66,14 @@ then echo "git config --global init.defaultbranch $DefaultBranch" git config --global init.defaultbranch $DefaultBranch fi + +echo "---------------------------------------------" +echo "Set postBuffer size? Suggesting 157286400 (leave blank for no change)" +read -p "***:: " PostBufferSize +if [ $PostBufferSize ] +then + echo "git config --global http.postBuffer $PostBufferSize" + git config --global http.postBuffer $PostBufferSize +fi + + diff --git a/git-ignore-find2merge.bat b/git-ignore-find2merge.bat index 68d1838..4caff6e 100644 --- a/git-ignore-find2merge.bat +++ b/git-ignore-find2merge.bat @@ -23,13 +23,13 @@ if not exist "%ROOTPATH%" ( echo √√√ ROOTPATH = [[%ROOTPATH%]] ) -echo ::*** Enter [path to .gitignore.global.txt] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt]] +echo ::*** Enter [path to .gitignore_global] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global]] set /p IGNOREPATH=">>> " echo; if "" == "%IGNOREPATH%" ( - set IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt + set IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global ) else ( - for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/.gitignore.global.txt" + for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/.gitignore_global" if not exist "%IGNOREPATH%" ( echo ××× [[%IGNOREPATH%]] not exist! Exit now. *** @ GOTO END diff --git a/git-ignore-find2merge.sh b/git-ignore-find2merge.sh index 0dd4dd9..1dac158 100644 --- a/git-ignore-find2merge.sh +++ b/git-ignore-find2merge.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "" -echo "Search in [ROOTPATH], merge [IGNOREPATH/.gitignore.global.txt] and [ROOTPATH/*/.gitignore.local.txt] files to [seafile-ignore.txt]" +echo "Search in [ROOTPATH], merge [IGNOREPATH/.gitignore_global] and [ROOTPATH/*/.gitignore.local.txt] files to [seafile-ignore.txt]" echo "" if [ -d "$1" ] @@ -26,13 +26,13 @@ else fi echo "" -echo "::*** Enter [path to .gitignore.global.txt] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt]]" +echo "::*** Enter [path to .gitignore_global] or [leave blank] for default [[https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global]]" read -p "***:: " IGNOREPATH if [ "$IGNOREPATH" ] then if [ -d "$IGNOREPATH" ] then - IGNOREPATH=$(realpath $IGNOREPATH)/.gitignore.global.txt + IGNOREPATH=$(realpath $IGNOREPATH)/.gitignore_global fi if [ ! -f "$IGNOREPATH" ] then @@ -42,7 +42,7 @@ then echo "√√√ IGNOREPATH = [[$IGNOREPATH]]" fi else - IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt + IGNOREPATH=https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global fi echo "" diff --git a/git-ignore-merge-here.sh b/git-ignore-merge-here.sh index f81c494..2f3bc7a 100644 --- a/git-ignore-merge-here.sh +++ b/git-ignore-merge-here.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo ::*** Merge remote [.gitignore.global.txt] and local [.gitignore.local.txt] to [.gitignore] -curl -sSL https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt > .gitignore +echo ::*** Merge remote [.gitignore_global] and local [.gitignore.local.txt] to [.gitignore] +curl -sSL https://git.tic.cc/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global > .gitignore if [ -f .gitignore.local.txt ]; then cat .gitignore.local.txt >> .gitignore; fi; echo diff --git a/nixhome-config.sh b/nixhome-config.sh index 8f84957..98a9f90 100755 --- a/nixhome-config.sh +++ b/nixhome-config.sh @@ -6,7 +6,7 @@ elif [ -d "$(pwd)/nixhome" ]; then NIXHOME=$(pwd)/nixhome else echo "" - echo "::*** Enter [root path] or [leave blank] for default to [[$(pwd)]]" + echo "::*** Enter [root path of nixhome] or [leave blank] for current [[$(pwd)]]" read -p "***:: " NIXHOME if [ -z "$NIXHOME" ]; then NIXHOME=$(pwd) @@ -38,7 +38,7 @@ if [ -d "$HomePath" ]; then pushd "$HomePath" - homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore.global.txt" + homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore_global" echo echo "::*** Copy or link scripts? [l] to link, [c] to copy, [g] to git import, [anything else] to omit:" read -p "***:: " CopyOrLinkScripts diff --git a/nixhome/.bash_profile b/nixhome/.bash_profile index 203bc64..c6e44c3 100644 --- a/nixhome/.bash_profile +++ b/nixhome/.bash_profile @@ -19,3 +19,7 @@ unset USERNAME ################################################################################ # End Of File: "~/.bash_profile" ################################################################################ + +# Added by OrbStack: command-line tools and integration +# This won't be added again if you remove it. +source ~/.orbstack/shell/init.bash 2>/dev/null || : diff --git a/nixhome/.gitignore.global.txt b/nixhome/.gitignore_global similarity index 98% rename from nixhome/.gitignore.global.txt rename to nixhome/.gitignore_global index 31855b1..460d0c8 100644 --- a/nixhome/.gitignore.global.txt +++ b/nixhome/.gitignore_global @@ -5,7 +5,7 @@ # https://github.com/SlideWave/gitignore-include?tab=readme-ov-file#examples # https://gitignore.io -### .gitignore.global.txt ### +### .gitignore_global ### # Self defined pattern to ignore ?*.gitignore diff --git a/proxy.sh b/proxy.sh index bf579fd..d30e42d 100755 --- a/proxy.sh +++ b/proxy.sh @@ -11,10 +11,10 @@ fi # to reset port to empty, otherwise the second run of this script will not ask for port. PORT= -PORTDEFAULT=20170 +PORTDEFAULT=17890 # function proxy() { if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then - echo "::*** Proxy server running on [port number] or [leave blank] for default $PORTDEFAULT (20170 for v2ray2, or 7897 for clash verge)" + echo "::*** Proxy server running on [port number] or [leave blank] for default $PORTDEFAULT (20170 for v2ray2, 17890 for 零点云, or 7897 for clash verge)" while [ ! "$PORT" ] do read -p "***:: " PORT diff --git a/ssh.sh b/ssh.sh index c670b53..df2d0a4 100644 --- a/ssh.sh +++ b/ssh.sh @@ -11,8 +11,11 @@ fi # Path to the settings.json file SETTINGS_FILE="$HOME/Library/Application Support/Code/User/settings.json" if [[ ! -f "$SETTINGS_FILE" ]]; then + SETTINGS_FILE="$HOME/product_产品/.vscode/settings.json" + if [[ ! -f "$SETTINGS_FILE" ]]; then echo "settings.json file not found!" exit 1 + fi fi # 自定义的列表,但是测试有问题,只有第一行被select添加了序号