This commit is contained in:
Luk 2026-01-18 22:45:46 +08:00
parent ce814d7706
commit 032fed7913
10 changed files with 35 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ""

View File

@ -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

View File

@ -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

View File

@ -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 || :

View File

@ -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

View File

@ -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

3
ssh.sh
View File

@ -10,10 +10,13 @@ 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添加了序号
# targets=$(jq -r '.["sshfs.configs"][] | "\(.name)"' "$SETTINGS_FILE")