A "dotfiles" approach can help you set up a new machine much faster and more importantly keep a consistent system environment. So I join this big dotfiles family! :3
- What is xxx does dotfiles? Please read Getting Started With Dotfiles.
- The dotfiles community is so big. Github keeps a good list in https://dotfiles.github.io/.
- Main machine: macOS:
- All kinds of dev, design and productivities.
- Remote dev machines: Ubuntu Server LTS:
- A bunch of cheap servers for coding and prototyping.
- Dev dir:
~/dev - Dotfiles dir:
~/dev/dotfiles - App/package managers:
- Mac AppStore for apps
brew caskfor more appsbrewfor cli toolsmisefor tool version management, e.g. Node, Python, etc.
- Small details:
- Cask apps in customized directory:
/Applications/Cask - For Ruby projects, I generally use
bundler. - For Ruby gems, I disabled documentation generation no matter install and update.
- Cask apps in customized directory:
. backup.shto backup a list to brew_leaves.txt, brew_cask_list.txt and app_list.txt, etc.
-
Make sure your internet connection is stable.
-
Change your computer name and local host name:
computer_name="EddiMBP" # replace with your preferred name sudo scutil --set ComputerName "$computer_name" sudo scutil --set LocalHostName "$computer_name" dscacheutil -flushcache
-
Install Xcode command line tools or app:
xcode-select --install # then click "Install" for CLT only or "Get Xcode" for full Xcode.app -
Health check:
xcode-select -p # expect return: /Applications/Xcode.app/Contents/Developer gcc --version # check if git and "osxkeychain helper" are already installed git credential-osxkeychain # expect return: "usage:..."
-
Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" export HOMEBREW_CASK_OPTS="--appdir=/Applications/Cask" brew doctor # may need to fix some problems brew update
-
If it is the first time you do dotfiles, click the nice Fork button in this repo.
-
If the dotfiles directory does not exist in your dev directory, clone your own dotfiles repo to your local machine in
~/dev/dotfiles:my_git_username="Edditoria" # replace with your git username dotfiles_dir="$HOME/dev/dotfiles" # change it if your want mkdir -p $dotfiles_dir git clone https://github.com/$my_git_username/dotfiles.git $dotfiles_dir cd $dotfiles_dir && git remote -v && ls
-
Initial install script:
cd ~/dev/dotfiles source install.sh
-
Initial config Git and GitLab:
source setup_git.shnote: Something wrong when you add a SSH key to GitLab? Here is some information you need:
- Copy SSH key to clipboard:
pbcopy < ~/.ssh/id_rsa.pub - Paste the key to this URL: https://gitlab.com/profile/keys
- Copy SSH key to clipboard:
-
Config cask apps, especially Evernote. -
For Ruby projects, you still need to
be {command}(alias ofbundle exec). -
Setup symlink to
~/devln -s $DEV $HOME/dev
-
Add Novel_customized theme to Terminal.
source setup_terminal.sh -
Manually verify login items according to backup files.
-
Manually install apps that are not in caskroom nor Apple AppStore. In my case:
- Tuxera NTFS (bundled in Toshiba external hard drive)
-
Manually config notification center.
-
Check Accessibility in Security & Privacy.
- Merge my Evernote: Setup Dev Env 2014.
- Build checking system:
- Check dotfiles directory.
- Compare installed things, and monitor them.
- Compare updated packages in npm, brew and etc. (using private log).
- A maintenance session in README to includes:
- Backup npm and meteorjs
- Update Accessibility in Security & Privacy.
- Update Login Items in Users & Groups.
Copyright (c) Edditoria. All rights reserved. Code released under the MIT License. Docs released under Creative Commons.
As human-readable summary (but not a substitute for the license):
You can use it, share it, modify the code and distribute your work for private and commercial uses. If you like, please share your work with me. 🍕