| A restore point for sync your settings and preferences in your toolbox.
Dotfiles provides a fast setup for backup, restore, and sync the prefs and settings for your toolbox. Dotfiles might be the most important files on your machine and I hope it helps you as much as it helps me!
Start reading this document to see it is not difficult as you might have imagined. Just follow the step by step.
NOTE: This tips is just a personal reference, use with care.
Homebrew is the package manager for macOS (or Linux).
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Dependencies
brew install git heroku nvm wget yarn
Apps
brew cask install appcleaner authy browserstacklocal caffeine docker google-chrome flume franz lastpass logitech-presentation kap sketch slack sourcetree spotify visual-studio-code vlc
Plugins
brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize webpquicklook suspicious-package quicklookase qlvideo && mv ~/Downloads/.qlgenerator > ~/Library/QuickLook && qlmanage -r
Plugins
Visual Studio Code is a source-code editor developed by Microsoft.
code --install-extension aaron-bond.better-comments && code --install-extension christian-kohler.path-intellisense && code --install-extension codezombiech.gitignore && code --install-extension dbaeumer.vscode-eslint && code --install-extension deerawan.vscode-whitespacer && code --install-extension dracula-theme.theme-dracula && code --install-extension eamodio.gitlens && code --install-extension EditorConfig.EditorConfig && code --install-extension eg2.vscode-npm-script && code --install-extension esbenp.prettier-vscode && code --install-extension formulahendry.auto-close-tag && code --install-extension formulahendry.auto-complete-tag && code --install-extension formulahendry.auto-rename-tag && code --install-extension formulahendry.code-runner && code --install-extension formulahendry.terminal && code --install-extension JerryHong.autofilename && code --install-extension mikestead.dotenv && code --install-extension ms-vscode.sublime-keybindings && code --install-extension ms-vscode.vscode-typescript-tslint-plugin && code --install-extension msjsdiag.debugger-for-chrome && code --install-extension NathanRidley.autotrim && code --install-extension PKief.material-icon-theme && code --install-extension Shan.code-settings-sync && code --install-extension Tyriar.lorem-ipsum && code --install-extension WakaTime.vscode-wakatime && code --install-extension xabikos.JavaScriptSnippets && code --install-extension Zignd.html-css-class-completion
After install, confirm all plugins installed:
code --list-extensions
Settings
{
"files.autoSave": "onFocusChange",
"files.autoSaveDelay": 0,
"files.defaultLanguage": "en",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"editor.detectIndentation": true,
"editor.detectIndentation": true,
"files.trimTrailingWhitespace": true,
"editor.fontSize": 14,
"editor.tabSize": 2,
"markdown.preview.fontSize": 14,
"window.openFilesInNewWindow": "on",
"workbench.colorTheme": "Dracula",
"workbench.iconTheme": "material-icon-theme"
}
Google Chrome is a cross-platform web browser developed by Google.
Plugins
GitHub is provides hosting for software development version control using Git.
SSH Settings
ssh-keygen -t rsa -b 4096 -C "[email protected]"
eval "$(ssh-agent -s)"
printf "ServerAliveInterval 60\nHost github.com\nHostname ssh.github.com\nPort 443\n" > ~/.ssh/config
ssh-add -K ~/.ssh/id_rsa
pbcopy < ~/.ssh/id_rsa.pub
GPG Settings
https://gist.github.com/troyfontaine/18c9146295168ee9ca2b30c00bd1b41e
Git Settings
Make it even easier version control ~/.gitconfig
[user]
name = CJ Patoilo
email = [email protected]
signingkey = "Your Sign In Key"
[branch]
autosetupmerge = always
[alias]
ci = commit -am
lo = log --pretty=format:'%an - %h %s %ar'
st = status
br = branch
sw = show
df = diff
fe = fetch
mg = merge
rb = rebase
rt = remote -v
co = checkout
po = push origin
pu = pull origin
pom = push origin master
pum = pull origin master
com = checkout master
pod = push origin develop
pud = pull origin develop
cod = checkout develop
pog = push origin gh-pages
pug = pull origin gh-pages
cog = checkout gh-pages
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
[core]
excludesfile = ~/.gitignore_global
[commit]
template = ~/.stCommitMsg
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
trustExitCode = true
path =
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
The Terminal is an interface that allows you to access the command line from the GUI.
Bash Settings
First create Bash Profile file mkdir ~/.bash_profile
and add this content:
# Show current Git branch name in bash PS1
source "$HOME/.gitprompt"
PS1="\[\033[1;36m\]\u\[\033[32m\]\$(__git_ps1)\[\033[0m\] $\[\033[0m\] "
# Define alias
alias reload="source ~/.bash_profile"
alias cls="clear"
alias www="cd $HOME/Www/"
# Add local bin for all Homebrew stuff
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"
# GPG2
macOS is a series of graphical operating systems developed and marketed by Apple Inc.
xcode-select --install
Settings
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder AppleShowAllFiles -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder QLEnableTextSelection -bool true
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
defaults write com.apple.TextEdit RichText -int 0
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
defaults write com.apple.screencapture location -string "$HOME/Desktop"
defaults write com.apple.screencapture type -string "png"
defaults write com.apple.screencapture disable-shadow -bool true
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
defaults write com.apple.spotlight orderedItems -array \
'{"enabled" = 1;"name" = "APPLICATIONS";}' \
'{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \
'{"enabled" = 1;"name" = "DIRECTORIES";}' \
'{"enabled" = 1;"name" = "PDF";}' \
'{"enabled" = 1;"name" = "FONTS";}' \
'{"enabled" = 0;"name" = "DOCUMENTS";}' \
'{"enabled" = 0;"name" = "MESSAGES";}' \
'{"enabled" = 0;"name" = "CONTACT";}' \
'{"enabled" = 0;"name" = "EVENT_TODO";}' \
'{"enabled" = 0;"name" = "IMAGES";}' \
'{"enabled" = 0;"name" = "BOOKMARKS";}' \
'{"enabled" = 0;"name" = "MUSIC";}' \
'{"enabled" = 0;"name" = "MOVIES";}' \
'{"enabled" = 0;"name" = "PRESENTATIONS";}' \
'{"enabled" = 0;"name" = "SPREADSHEETS";}' \
'{"enabled" = 0;"name" = "SOURCE";}'
killall mds
sudo mdutil -i on /
sudo mdutil -E /
Want to contribute? Follow these recommendations.
Designed with ♥ by CJ Patoilo. Licensed under the MIT License.