u
This commit is contained in:
parent
5753b72fa3
commit
d612f10ed9
@ -20,7 +20,7 @@ then
|
|||||||
# 用 dpkg --print-architecture 更直接
|
# 用 dpkg --print-architecture 更直接
|
||||||
ARCH=`dpkg --print-architecture`
|
ARCH=`dpkg --print-architecture`
|
||||||
else
|
else
|
||||||
if [ "$(uname -m)" = "aarch64" ]
|
if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ] # on MacBook Air M2, $(uname -m) returns 'arm64'
|
||||||
then
|
then
|
||||||
ARCH=arm64
|
ARCH=arm64
|
||||||
elif [ "$(uname -m)" = "armv7l" ]
|
elif [ "$(uname -m)" = "armv7l" ]
|
||||||
|
9
mac-accelerate-backup.sh
Normal file
9
mac-accelerate-backup.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# https://blog.csdn.net/fuxin123123/article/details/122288466
|
||||||
|
# Mac TimeMachine 全速备份
|
||||||
|
# 如果你的 Mac 是第一次备份,一般都很慢,可以调节参数的方式将其调节为全速进行备份,记得备份完后将其调整回来,否则可能会导致你的电脑在正常使用的时候由于同时在备份导致卡顿。
|
||||||
|
# 打开终端,执行如下命令开启全速备份:
|
||||||
|
# 测试发现,对通过 Finder 备份 iPhone 也有效
|
||||||
|
sudo sysctl debug.lowpri_throttle_enabled=0
|
||||||
|
|
||||||
|
# 关闭全速备份:
|
||||||
|
sudo sysctl debug.lowpri_throttle_enabled=1
|
@ -1,6 +1,6 @@
|
|||||||
defaults write com.apple.dock springboard-rows -int 9
|
defaults write com.apple.dock springboard-rows -int 9
|
||||||
|
|
||||||
defaults write com.apple.dock springboard-columns -int 12
|
defaults write com.apple.dock springboard-columns -int 15
|
||||||
|
|
||||||
defaults write com.apple.dock ResetLaunchPad -bool true
|
defaults write com.apple.dock ResetLaunchPad -bool true
|
||||||
|
|
||||||
|
@ -1,5 +1,21 @@
|
|||||||
|
# install: https://docs.brew.sh/Installation
|
||||||
|
# 用 *.pkg 安装的效果和命令行其实一样
|
||||||
echo "Installing Homebrew on MacOS"
|
echo "Installing Homebrew on MacOS"
|
||||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
# default brew path: /opt/homebrew for Apple Silicon, /usr/local/Homebrew for macOS Intel and /home/linuxbrew/.linuxbrew for Linux
|
||||||
|
# add brew to path:
|
||||||
|
# (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/luk/.bash_profile
|
||||||
|
# eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
|
#
|
||||||
|
# export HOMEBREW_PREFIX="/opt/homebrew";
|
||||||
|
# export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
|
||||||
|
# export HOMEBREW_REPOSITORY="/opt/homebrew";
|
||||||
|
# export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
|
||||||
|
# export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
|
||||||
|
# export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
|
||||||
|
#
|
||||||
|
|
||||||
# uninstall: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
|
|
||||||
|
# uninstall: https://github.com/homebrew/install#uninstall-homebrew
|
||||||
|
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
|
||||||
# install emacs: brew cask install emacs
|
# install emacs: brew cask install emacs
|
||||||
|
@ -77,7 +77,7 @@ umask 022 # rwxr-xr-x
|
|||||||
# PROMPT_COMMAND is expanded only when used.
|
# PROMPT_COMMAND is expanded only when used.
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm*|rxvt*)
|
xterm*|rxvt*)
|
||||||
PROMPT_COMMAND='echo -ne "\033]0;<${USER}@${HOSTNAME}::${PWD}>B\007"'
|
PROMPT_COMMAND='echo -ne "\033]0;<${USER}@${HOSTNAME}:${PWD}>B\007"'
|
||||||
;;
|
;;
|
||||||
dumb*)
|
dumb*)
|
||||||
;;
|
;;
|
||||||
@ -130,6 +130,17 @@ xterm*|rxvt*)
|
|||||||
esac
|
esac
|
||||||
############## above settings copied from amazon's debian ####################
|
############## above settings copied from amazon's debian ####################
|
||||||
|
|
||||||
|
if [ "$(uname)" = "Darwin" ]
|
||||||
|
then
|
||||||
|
if [ "$(uname -m)" = "arm64" ] && [ -f /opt/homebrew/bin/brew ]
|
||||||
|
then
|
||||||
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
|
elif [ "$(uname -m)" = "x86_64" ] && [ -f /usr/local/homebrew/bin/brew ]
|
||||||
|
then
|
||||||
|
eval "$(/usr/local/homebrew/bin/brew shellenv)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# nvm settings
|
# nvm settings
|
||||||
if [ -d $HOME/.nvm ]
|
if [ -d $HOME/.nvm ]
|
||||||
then
|
then
|
||||||
@ -139,6 +150,12 @@ then
|
|||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# fnm settings
|
||||||
|
# if [ $(which fnm) ]
|
||||||
|
# then
|
||||||
|
# eval "$(fnm env --use-on-cd)"
|
||||||
|
# fi
|
||||||
|
|
||||||
# acme.sh settings
|
# acme.sh settings
|
||||||
if [ -f $HOME/.acme.sh/acme.sh.env ]
|
if [ -f $HOME/.acme.sh/acme.sh.env ]
|
||||||
then
|
then
|
||||||
@ -150,15 +167,10 @@ fi
|
|||||||
export USERPROFILE=$HOME
|
export USERPROFILE=$HOME
|
||||||
|
|
||||||
# # add sysconfig to path
|
# # add sysconfig to path
|
||||||
# tp1=/faronear/sysconfig
|
if [ -e ~/sysconfig ]
|
||||||
# tp2=~/sysconfig
|
then
|
||||||
# if [ -d $tp1 ]
|
export PATH=~/sysconfig:$PATH
|
||||||
# then
|
fi
|
||||||
# export PATH=$tp1:$PATH
|
|
||||||
# elif [ -d $tp2 ]
|
|
||||||
# then
|
|
||||||
# export PATH=$tp2:$PATH
|
|
||||||
# fi
|
|
||||||
|
|
||||||
if [ -f ~/.bashrc_custom ]
|
if [ -f ~/.bashrc_custom ]
|
||||||
then
|
then
|
||||||
|
6
proxy.sh
6
proxy.sh
@ -9,9 +9,9 @@ fi
|
|||||||
|
|
||||||
# function proxy() {
|
# function proxy() {
|
||||||
if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then
|
if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then
|
||||||
export all_proxy=socks5://127.0.0.1:1086
|
export all_proxy=socks5://127.0.0.1:7898
|
||||||
export http_proxy=socks5://127.0.0.1:1086
|
export http_proxy=socks5://127.0.0.1:7898
|
||||||
export https_proxy=socks5://127.0.0.1:1086
|
export https_proxy=socks5://127.0.0.1:7898
|
||||||
echo -e "--- 已开启网络代理"
|
echo -e "--- 已开启网络代理"
|
||||||
elif [ "$proxySwitch" == "t" ] || [ "$proxySwitch" == "0" ]; then
|
elif [ "$proxySwitch" == "t" ] || [ "$proxySwitch" == "0" ]; then
|
||||||
unset all_proxy
|
unset all_proxy
|
||||||
|
Loading…
Reference in New Issue
Block a user