Sync macOS ssh config with iCloud

As a developer, due to the reasons of beta systems, I sometimes have to restore backups.

Luckily, most of the data these days is on the server. Not only Safari, Photos, Calendar, Notes, and Reminders, but also other apps use iCloud storage. This is a great improvement. I just need to re-download the apps from the App Store and brew shell after reinstalling the system.

But setting up ssh and configuration settings is annoying. Moreover, I might lose my private key.

So, I created a new folder named “macOS “ in the iCloud Drive folder and copied all the files that do not have “. “ to it, for example: .gitconfig ~> gitconfig.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cd ~
macOS=/Users/art/Library/Mobile\ Documents/com~apple~CloudDocs/macOS

ln -sf $macOS/gitignore .gitignore
ln -sf $macOS/gitignore .gitignore_global
ln -sf $macOS/gitconfig .gitconfig

ln -sf $macOS/zshrc .zshrc
ln -sf $macOS/config .config
ln -sf $macOS/ssh .ssh

mkdir -p Blog

# hexo
npm install hexo-cli -g
hexo init Blog
cd Blog
npm install
rm -rf source
ln -s ~/Documents/Blog/source ~/Blog/source

brew install ruby python pandoc

brew install openssl youtube-dl ffmpeg pyenv rbenv rclone autojump mp4box

ruby

Install Ruby version 2.7.0 with rbenv and set it as global.

1
2
rbenv install 2.7.0
rbenv global 2.7.0

Install various applications with Homebrew, including iTerm2, Sourcetree, VMware Fusion, Flux, Sublime Text, ShadowsocksX-NG, ClashX, WWDC, Spectacle, LosslessCut, IINA, Dropbox, Typora, iStat Menus, 1Password, Calibre, ImageOptim, Plex Media Server, Visual Studio Code, OSXFUSE, Firefox, and Chromium.

1
brew cask install iterm2 sourcetree vmware-fusion flux sublime-text shadowsocksx-ng clashx wwdc spectacle losslesscut iina dropbox typora istat-menus 1password calibre imageoptim plex-media-server vscode osxfuse firefox chromium

Install Quick Look plugins for displaying video, text, code, JSON, Markdown, patches, image sizes and details, and information about packages and provisioning profiles.

1
brew cask install qlvideo qlstephen qlcolorcode quicklook-json qlmarkdown qlprettypatch qlimagesize suspicious-package provisionql

While any cloud storage service like Dropbox can do this, iCloud is my choice considering privacy and the information in the letter to customers written by Tim Cook.

1
However, any cloud storage service (such as Dropbox) can do this, but considering privacy and the information in this letter [given to customers](http://www.apple.com/customer-letter/) by Tim Cook, iCloud is my choice 😊

Powered by OpenAI, gpt-3.5-turbo-0301