Config is a basic checklist I follow to set up a new Mac's development environment. It gets me up to speed with Git, Ruby, GitHub, Jekyll, and more so I can more quickly get back to coding.
Hello world!
File | Description |
---|---|
.bash_profile |
Customizes the Terminal.app prompt and echoes the currently checked out Git branch. |
.gitconfig |
Global Git configuration to specify my name and email, shortcuts, colors, and more. |
.gitignore |
The ignore file from twbs/bootstrap that I use everywhere. |
- Download and install latest version of Xcode from the Mac App Store.
- Download and install Xcode Command Line Tools from https://developer.apple.com/downloads/.
Be sure to open Xcode and agree to the terms of use.
Both overlap in some functionalities, the more concise may be the Udacity configs.
- Load
.bash_profile
, note that - Load
.gitconfig
contents into the global~/.gitconfig
- Load up the Ocean theme from https://github.com/mdo/ocean-terminal
- Add tab completions for git commands in terminal.app https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion
Can also follow along setup for Udacity's terminal configuration used in the learning version control course. See the udacity-terminal-config directory
- Load
.bash_profile
, append dot to file name. - Load
.git-completions.bash
- Load
.git-prompt
- Generate new SSH key
- Generate an access token for Terminal to authorize your GitHub account when 2FA is enabled.
Go to 6. Additional dependencies section below before reading this section.
Download git via Homebrew brew install git
, or see git docs for alternative installation guides.
Install GitHub Desktop
- Install rbenv via Homebrew:
brew install rbenv
. - Download a version of Ruby via rbenv (e.g.,
rbenv install 2.2.3
). See https://gorails.com/setup/osx/10.11-el-capitan. - Make it the global version of Ruby:
rbenv global 2.2.3
.
Installing and managing Ruby with rbenv allows us to specify versions of Ruby on a per-project basis. It also means we can avoid running sudo commands for installing gems and more as it's not affecting OS X's system Ruby.
Having trouble with nokogiri? See https://stackoverflow.com/a/41491487.
- Install Homebrew,
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
.- See notes on using the
brewup
command added to the .bashprofile. - Article on keeping Homebrew up to date.
- Aricle on using Homebrew.
- See notes on using the
- Install node via Homebrew:
brew install node
. - Install Sass, Jekyll, and Rouge:
gem install bundler sass jekyll rouge
. - Homebrew Commands Cheatsheet.
Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion. from ST3 Docs
Enable subl
terminal commands, by entering in the terminal:
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl;
Add support for smerge
command in .bash_profile
PATH="/Applications/Sublime Merge.app/Contents/SharedSupport/bin:{$PATH}"
export PATH
Download here: https://fonts.google.com/specimen/Source+Code+Pro
Update User Settings:
"font_face": "Source Code Pro",
"font_size": 12,
Allows the use of ST3 to pop up when composing git commit messages, the advantage is that ST3 has a spell checker.
git config --global core.editor "subl -n -w"
Can CMD + Shift + P > Install Package > type in the below plugins
- Sublime Tutor
- BracketHighlighter
- Emmet
- GitGutter
- Sublime Linter (requires npm)
- DocBlockr
- TerminalView
- SCSS
- Sass
- Liquid
- Markdown Extended
- AdvanceNewFile
- Markdown Editing
- EditorConfig
- SideBarEnhancements
- MarkdownTOC
- Js Prettier (requires npm prettier)
- Liquid
- Babel
- CSV
- Compare Side-By-Side
- HTML Beautify
- InsertDate
- JavaScript Completions
- jQuery
- Pretty JSON
- Solarized Color Scheme
- Terminal
- View In Browser
Add my user preferences. Check file
A Language Server Protocol (LSP) is a specification about the communication protocols for use between text editors or IDEs and language servers - tools which provide language-specific features like auto-complete, go to definition, or documentation on hover.
Install Shopify theme-check LSP server. Guide for Sublime text here
Resources:
ToDo Directions for setting up ESLINT.
Follow tutorial here
- Open Automator and create a new service
- Select "files or folder" option for "Services receives selected" option
- Left pane, select "Open Finder Items" and drag to the right pane.
- New in "Open with" action, select Sublime Text 3
- Save the new service (i.e. "Open with Sublime Text 3")
- Try it in Finder!
Repeat steps to add Sublime Merge as well.
- Disable LCD font smoothing
- Configure Security & Privacy settings
- Require password immediately
- Show a message when screen is locked > Set Lock Message > Add Name & Phone Number
- Hide desktop icons with
defaults write com.apple.finder CreateDesktop false; killall Finder
- Set sidebar icons to Small
- Type faster by going to Keyboard and moving
Key Repeat
all the way toFast
andDelay until repeat
all the way toShort
. - Bump up the contrast, go to Accessibility and check
Reduce Motion
,Increase Contrast
. - Get 24-Hour time by going to Language and Region and checking the
Time Format
check box. - Add
CMD + SHIFT + .
shortcut key to show/hide hidden files in Finder.app - Add Source Code Pro
- Download: https://github.com/adobe-fonts/source-code-pro
- Setup:
brew tap caskroom/fonts && brew cask install font-source-code-pro
- Alternatively, download and install
Original article by osxdaily found here.
Quick guide:
- Launch System Preferences from the Apple menu
- Click on the “Keyboards” preference panel
- Select the “Shortcuts” tab (sometimes called “Keyboard Shortcuts” in older versions of OS X)
- Look near the bottom of the window for a mention of “Full Keyboard Access: In windows and dialogs, press Tab to move keyboard focus between:” and click to select the radio button next to “All controls”*
- Close System Preferences
- macOS Security and Privacy-Guide
- EFF Privacy Guidelines available,
- Remove Adobe Flash from macos
- Kamino extension for cloning GitHub issues
- Shopify theme inspector
Install GitHub Desktop App
View guide: https://shopify.github.io/themekit/#installation.
Download Shopify CLI which has mostly replaced Theme Kit tool.
Download via Homebrew
brew tap shopify/shopify
brew install shopify-cli
Verify
shopify version
Full guide: https://shopify.dev/themes/tools/cli/installation
Checkout full guide: https://cli.github.com/manual/
Install via Homebrew
brew install gh
Configure preferred text editor
gh config set editor "subl -n -w"
$ git config --global core.editor "subl -n -w"
TODO: Add here.
See here. Just ask Gemini how to install it locally. Run the code.
git config --local commit.template .git_commit_template.txt
Fork this repo, or just copy-paste things you need, and make it your own. Please be sure to change your .gitconfig
name and email address though!
- http://sourabhbajaj.com/mac-setup/index.html
- https://hackercodex.com/guide/mac-development-configuration/
- http://robdodson.me/sublime-text-2-tips-and-shortcuts/
- https://packagecontrol.io/
- https://www.sublimetext.com/docs/3/
Yup, it does. Hopefully it does on yours as well, but please don't hate me if it doesn't.
<3