Compare commits

...

2 Commits

Author SHA1 Message Date
luk
9992fb331a u 2024-08-03 14:24:45 +08:00
luk
29a2b5d7db u 2024-08-03 14:24:29 +08:00
17 changed files with 77 additions and 56 deletions

View File

@ -4,7 +4,7 @@ if [ $1 ]
then then
VERSION=$1 VERSION=$1
else else
echo "=== Enter geth \n [version number] for example 1.10.26 \n [leave blank] for the latest version" echo "=== Install geth version of \n [version number] for example 1.10.26 \n [leave blank] for the latest version"
read -p ">>> " VERSION read -p ">>> " VERSION
fi fi

3
mac-autohide-dock.sh Normal file
View File

@ -0,0 +1,3 @@
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

30
mac-brew-default-apps.sh Normal file
View File

@ -0,0 +1,30 @@
echo "=== Install formulaes and casks, enter [y] for Yes, [anything else] for No:"
echo
formulaeList=(jq openssl pandoc speedtest-cli yt-dlp)
for APP in "${formulaeList[@]}"
do
echo "--- brew install $APP"
read -p ">>> " YN
if [ "$YN" = 'y' ]
then
brew install $APP
fi
echo
echo "*************************************************"
echo
done
caskList=(appcleaner avidemux baidunetdisk cloudflare-warp cursor douyin drawio emacs futubull iina iterm2 lx-music miniconda obs poe qq seafile-client shotcut spacelauncher sqlitestudio telegram-desktop telegram-lite termius thunder warp wechat)
for APP in "${caskList[@]}"
do
echo "--- brew install $APP"
read -p ">>> " YN
if [ "$YN" = 'y' ]
then
brew install $APP
fi
echo
echo "*************************************************"
echo
done

View File

@ -20,3 +20,5 @@ echo "Installing Homebrew on MacOS"
# uninstall: https://github.com/homebrew/install#uninstall-homebrew # uninstall: https://github.com/homebrew/install#uninstall-homebrew
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" # /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
# update brew itself: brew update

View File

@ -1,15 +0,0 @@
defaults write com.apple.dock springboard-rows -int 9
defaults write com.apple.dock springboard-columns -int 15
defaults write com.apple.dock ResetLaunchPad -bool true
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
# Don't create .DS_Store files
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
# To enable: defaults delete com.apple.desktopservices DSDontWriteNetworkStores
killall Dock

View File

@ -0,0 +1,3 @@
# Don't create .DS_Store files
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
# To enable: defaults delete com.apple.desktopservices DSDontWriteNetworkStores

View File

@ -1,24 +0,0 @@
echo "=== Install formulaes and casks, enter [y] for Yes, [anything else] for No:"
echo
formulaeList=(jq openssl pandoc speedtest-cli sqlite yt-dlp)
for APP in "${formulaeList[@]}"
do
echo "--- brew install $APP"
read -p ">>> " YN
if [ "$YN" = 'y' ]
then
echo brew install $APP
fi
done
caskList=(appcleaner avidemux baidunetdisk cloudflare-warp cursor douyin drawio emacs futubull iina lx-music miniconda obs poe qq seafile-client shotcut spacelauncher sqlitestudio telegram-desktop telegram-lite termius thunder warp wechat)
for APP in "${formulaeList[@]}"
do
echo "--- brew install $APP"
read -p ">>> " YN
if [ "$YN" = 'y' ]
then
echo brew install $APP
fi
done

View File

@ -0,0 +1,7 @@
echo 删除 LaunchPad 里残留的图标
# open /private/var/folders/ in Finder, search for 'launchpad', right-click & select 'Services -> New Terminal at Folder' to open it in terminal:
cd /private/var/folders/ht/rgh2n38j5mvc08wkxhlb1wlw0000gn/0/com.apple.dock.launchpad/db
sqlite3 db "delete from apps where title='要删除的图标的名称';" && killall Dock

View File

@ -1,16 +1,16 @@
echo === Enter [row number] (7 for MBA, 9 for iMac) or [leave blank] for default to 9 echo "=== Enter [row number] (7 for MBA, 9 for iMac) or [leave blank] for default to 9"
read -p ">>> " ROWS read -p ">>> " ROWS
if [ "$ROWS" = "" ] if [ "$ROWS" = "" ]
then then
ROWS = 9 ROWS=9
fi fi
defaults write com.apple.dock springboard-rows -int $ROWS defaults write com.apple.dock springboard-rows -int $ROWS
echo === Enter [column number] (10 for MBA, 15 for iMac) or [leave blank] for default to 15 echo "=== Enter [column number] (10 for MBA, 15 for iMac) or [leave blank] for default to 15"
read -p ">>> " COLS read -p ">>> " COLS
if [ "$COLS" = "" ] if [ "$COLS" = "" ]
then then
COLS = 15 COLS=15
fi fi
defaults write com.apple.dock springboard-columns -int $COLS defaults write com.apple.dock springboard-columns -int $COLS

View File

@ -45,7 +45,7 @@ alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto' alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto' alias egrep='egrep --color=auto'
alias su='su -' alias su='su -'
alias npmc='npm --registry https://registry.npm.taobao.org' alias npmc='npm --registry https://registry.npmmirror.com'
alias npmr='npm --silent run' alias npmr='npm --silent run'
alias curlw='curl -sSL -o /dev/null -w "%{http_code} | %{time_total} s | %{size_download} bytes | %{url_effective}\n"' alias curlw='curl -sSL -o /dev/null -w "%{http_code} | %{time_total} s | %{size_download} bytes | %{url_effective}\n"'
if [ "$(uname)" = "Darwin" ] if [ "$(uname)" = "Darwin" ]

View File

@ -1 +1 @@
registry=https://registry.npm.taobao.org registry=https://registry.npmmirror.com

8
nodejs-remove.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
echo "Usage: this-script.sh [VERSION]"
sudo rm -fr /usr/local/bin/node
sudo rm -fr /usr/local/bin/npm
sudo rm -fr /usr/local/lib/node_modules
sudo rm -fr /usr/local/include/node

View File

@ -10,7 +10,7 @@
## '########################################################################' ## '########################################################################'
## 取消被默认添加到 .bashrc 的设置already integrated in nixhome/.bashrc ## 取消被默认添加到 .bashrc 的设置already integrated in nixhome/.bashrc
# pushd /faronear/sysconfig # pushd ~/sysconfig
# git reset . && git checkout . # git reset . && git checkout .
# popd # popd
@ -18,5 +18,5 @@ git clone https://github.com/nvm-sh/nvm.git ~/.nvm
echo echo
echo '############## If in China, set mirror before nvm install ##############' echo '############## If in China, set mirror before nvm install ##############'
echo export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node echo export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node
echo '########################################################################' echo '########################################################################'

View File

@ -11,10 +11,14 @@ fi
# function proxy() { # function proxy() {
if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then
echo "=== Proxy server running on port number: " echo "=== Proxy server running on [port number] or [leave blank] for default 7897"
while [ ! "$PORT" ] while [ ! "$PORT" ]
do do
read -p ">>> " PORT read -p ">>> " PORT
if [ ! "$PORT" ]
then
PORT=7897
fi
done done
export all_proxy=socks5://127.0.0.1:$PORT export all_proxy=socks5://127.0.0.1:$PORT
export http_proxy=socks5://127.0.0.1:$PORT export http_proxy=socks5://127.0.0.1:$PORT
@ -30,7 +34,10 @@ fi
fi fi
# } # }
echo all_proxy="$all_proxy" echo all_proxy=$all_proxy
echo http_proxy=$http_proxy
echo https_proxy=$https_proxy
# ip.gs, ip.sb, ipinfo.io # ip.gs, ip.sb, ipinfo.io
curl ipinfo.io curl ipinfo.io
echo " " echo " "

View File

@ -1,10 +1,10 @@
FROM amd64/node:16.18-bullseye FROM amd64/node:16.18-bullseye
LABEL org.opencontainers.image.authors="luk" LABEL org.opencontainers.image.authors="luk"
RUN npm i -g --registry https://registry.npm.taobao.org @vue/cli@4 RUN npm i -g --registry https://registry.npmmirror.com @vue/cli@4
RUN cd / && echo -e "\n" | vue create --registry https://registry.npm.taobao.org -p dcloudio/uni-preset-vue uniapp-cli RUN cd / && echo -e "\n" | vue create --registry https://registry.npmmirror.com -p dcloudio/uni-preset-vue uniapp-cli
# 上一行自动选择了第一个空模板,因此需要额外安装 sass # 上一行自动选择了第一个空模板,因此需要额外安装 sass
RUN cd /uniapp-cli && npm i -D --registry https://registry.npm.taobao.org sass@1.49.8 sass-loader@8.0.2 RUN cd /uniapp-cli && npm i -D --registry https://registry.npmmirror.com sass@1.49.8 sass-loader@8.0.2
EXPOSE 8080 EXPOSE 8080

View File

@ -1,10 +1,10 @@
FROM arm64v8/node:18.16-bullseye FROM arm64v8/node:18.16-bullseye
LABEL org.opencontainers.image.authors="luk" LABEL org.opencontainers.image.authors="luk"
RUN npm i -g --registry https://registry.npm.taobao.org @vue/cli@4 RUN npm i -g --registry https://registry.npmmirror.com @vue/cli@4
RUN cd / && echo -e "\n" | vue create --registry https://registry.npm.taobao.org -p dcloudio/uni-preset-vue uniapp-cli RUN cd / && echo -e "\n" | vue create --registry https://registry.npmmirror.com -p dcloudio/uni-preset-vue uniapp-cli
# 上一行自动选择了第一个空模板,因此需要额外安装 sass # 上一行自动选择了第一个空模板,因此需要额外安装 sass
RUN cd /uniapp-cli && npm i -D --registry https://registry.npm.taobao.org sass@1.49.8 sass-loader@8.0.2 RUN cd /uniapp-cli && npm i -D --registry https://registry.npmmirror.com sass@1.49.8 sass-loader@8.0.2
EXPOSE 8080 EXPOSE 8080