/dotfiles

My dotfiles and Mac setup procedure.

Primary LanguageShellMIT LicenseMIT

Jason Kiley's dotfiles

My dotfiles for macOS and procedure for setting up a new Mac.

Initial setup

mkdir projects
ln -fs "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/mini_projects" \
~/projects/mini_projects

XCode Command Line Tools

xcode-select --install

SSH

mkdir .ssh
ln -fs "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/_config/ssh-config" \
"${HOME}/.ssh/config"

Keys

source "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/_config/email.sh"
ssh-keygen -t rsa -N '' -C $EMAIL -f ~/.ssh/id_rsa
ssh-keygen -t rsa -N '' -C $EMAIL -f ~/.ssh/github
ssh-keygen -t rsa -N '' -C $EMAIL -f ~/.ssh/bitbucket
ssh-keygen -t rsa -N '' -C $EMAIL -f ~/.ssh/wrds

Github

# Copy ssh key to github.com
open -a TextEdit ~/.ssh/github.pub

# Test connection
ssh -T git@github.com

oh-my-zsh

#plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-docker.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-docker

Rust

Rust install page.

dotfiles

$ zsh -c "$(curl -fsSL raw.github.com/jtkiley/dotfiles/master/bin/dotfiles)"

Install and configure software

Dropbox

Dropbox

Install Rust components

rustup component add rls rust-analysis rust-src rustfmt

Install Homebrew cask items

brew install --cask iterm2
brew install --cask visual-studio-code
brew install --cask discord
brew install --cask mactex-no-gui
brew install --cask jupyter-notebook-viewer
brew install --cask skype
brew install --cask miniconda
brew install --cask docker
brew install --cask postgres

Install from App Store

Install from Third-Party Websites

Stata command line

  • Stata > Install Terminal Utility

Fonts

brew tap homebrew/cask-fonts
brew install --cask font-source-code-pro
brew install --cask font-source-serif-pro
brew install --cask font-source-sans-pro
brew install --cask font-libertinus

More SSH

Bitbucket

# Copy ssh key to bitbucket.org
code ~/.ssh/bitbucket.pub

# Test connection
ssh -T git@bitbucket.org

WRDS

WRDS SSH

cat ~/.ssh/wrds.pub | ssh USERNAME@wrds.wharton.upenn.edu 'cat >> .ssh/authorized_keys'

WRDS .pgpass

Set up .pgpass for WRDS Postgres (see here).

Create ~/.pgpass with the following contents (with USERNAME and PASSWORD actually filled in):

wrds-pgdata.wharton.upenn.edu:9737:wrds:USERNAME:PASSWORD

Then chmod 0600 ~/.pgpass.

Rerun dotfiles script

source ~/dotfiles/bin/dotfiles

Acknowledgements

Most of what is here is code, adaptation, or inspiration from: