u
This commit is contained in:
		
							parent
							
								
									29a2b5d7db
								
							
						
					
					
						commit
						9992fb331a
					
				
							
								
								
									
										3
									
								
								mac-autohide-dock.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mac-autohide-dock.sh
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										30
									
								
								mac-brew-default-apps.sh
									
									
									
									
									
										Normal 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 | ||||||
| @ -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 | ||||||
| @ -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 |  | ||||||
							
								
								
									
										3
									
								
								mac-disable-store-files.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mac-disable-store-files.sh
									
									
									
									
									
										Normal 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 | ||||||
| @ -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 |  | ||||||
							
								
								
									
										7
									
								
								mac-remove-launchpad-icons.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								mac-remove-launchpad-icons.sh
									
									
									
									
									
										Normal 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 | ||||||
| @ -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 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| echo "Usage: this-script.sh [VERSION]" | echo "Usage: this-script.sh [VERSION]" | ||||||
| 
 | 
 | ||||||
| rm -fr /usr/local/bin/node | sudo rm -fr /usr/local/bin/node | ||||||
| rm -fr /usr/local/bin/npm | sudo rm -fr /usr/local/bin/npm | ||||||
| rm -fr /usr/local/lib/node_modules | sudo rm -fr /usr/local/lib/node_modules | ||||||
| rm -fr /usr/local/include/node | sudo rm -fr /usr/local/include/node | ||||||
							
								
								
									
										11
									
								
								proxy.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								proxy.sh
									
									
									
									
									
								
							| @ -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 " " | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user