/dotfiles

Sensible hacker defaults for macOS

Primary LanguageShellMIT LicenseMIT

.dotfiles

This repo includes a shell script for executing the bulk of the configuration I follow to set up my Mac's development environment to get me up-to-speed with the tools et al. so I can more quickly get back to coding.

What's included:

File Description
setup-brew.zsh Install some of the core tools I use.
setup-sdk.zsh Install core tools for Java I use.
setup-macos.zsh Configure macOS and the Terminal to be smarter.
setup-symlink.zsh Create sim links for ~/.dotfiles/*.
.zshrc Customizes the default shell to be smarter.
.gh Global GitHub CLI configuration to specify shortcuts and helper functions.
.gitconfig Global Git configuration to specify my name and email, shortcuts, colors, and more.
.gitignore Global ignores from @github/gitignore that I use everywhere.
.npmrc Default configurations for Node Package Management tools like npm, yarn, pnpm etc.
.nvmrc Default configurations for Node Version Manager.
.sql-server Configure Azure SQL to run locally for my .NET Database Projects.

Install

WARNING ‼️ Make sure you know what you are doing and use at your own risk!

  1. First, run xcode-select --install to enable Command Line Tools.

  2. Next, run softwareupdate --install-rosetta enable Rosetta 2.

  3. Then, install Oh My Zsh.

  4. And, download and install Homebrew (or brew) and follow the post-installation instructions.

  5. Next, clone this repo into the hidden .dotfiles directory. Homebrew should install git, so we should be fine.

    git clone https://github.com/kosalanuwan/dotfiles ~/.dotfiles
  6. Create (or recreate) symlinks for .dotfiles.

    source ~/.dotfiles/setup-symlinks.zsh
  7. Then, update, upgrade, and install core tools and the stuff via brew.

    source ~/.dotfiles/setup-brew.zsh
  8. Next, install core tools for Java and the stuff via sdk.

    source ~/.dotfiles/setup-sdk.zsh

    SDKMAN install script tweaks our .zshrc file but those export commands are already done in the .zsh_exports, so we can disregard those changes.

  9. Download the rest of the apps from Apple App Store or otherwise.

    • Microsoft Office
    • Microsoft OneDrive, and
  10. Configure macOS and the Terminal.app to be smarter.

source ~/.dotfiles/setup-macos.zsh
  1. Import Terminal.app theme from @lysyi3m/macos-terminal-themes.

  2. Import Typora.app theme from @adrian-fuertes/notion-themes.

  3. Sign in to VS Code and sync settings, profiles, extensions et al.

  4. Sing in to gh.

    gh auth login
    # What account do you want to log into? GitHub.com
    # What is your preferred protocol for Git operations on this host? HTTPS
    # Authenticate Git with your GitHub credentials? Yes
    # How would you like to authenticate GitHub CLI? Login with a web browser

Useful Commands / Aliases

  • doc is the alias for docker and dc is the alias for docker compose.
  • sql is the alias for a dead simple SQL Server running on docker. Try sql h to show the list of supported commands.
  • gh a and git a are aliases to list all their aliases.
  • serve is a short hand command to run a dead simple web server from the current folder. Try serve 4321 to see it in action.
  • yolo is to upgrade Every Thuckin' Thing!.

WOMM

Yep, it works on my machine and hopefully it does on your's as well but please don't hate me if it doesn't.

Credit

Many of the customizations are taken from:

License

Copyright ©️ 2020 It's actually me (@kosalanuwan). All rights reserved.

The source code is licensed under the MIT license.