Skip to content

These are my dotfiles. Not much here and mainly for my own use. But you might find something good.

License

Notifications You must be signed in to change notification settings

tommyskott/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dot files

These are my dot files.
Mainly for my own references but you might find something useful.
Cheers! ✌️

macOS Setup Guide - for developers

This is the official Borgenfalk & Skott macOS setup guide, to help you set up your dev environment as fast as possible.

Why does this document exist? This is for the times when get a new computer and don't want to remember all the tools and steps that are needed to get your environment like you want it. So instead of googling and trying to remember what and how to install, simply follow this "well structured" guide.

  1. First things first, login to your Apple ID and iCloud account so your documents and data can start syncing.

  2. Turn on FileVault in System Settings -> Privacy & Security, to encrypt the data on your disk.

  3. Turn on the Firewall in System Settings -> Network -> Firewall.

  4. Download and install 1Password so your login credentials are easy to access for the rest of the guide.

  5. Download and install Google Chrome web browser and sign in to your profile.

  6. Download Xcode from the macOS App Store, or from Apple's website. When it has completed, install the Xcode cli tools with xcode-select --install.

  7. Login to your other accounts (e-mail, calendar, notes) in System Settings -> Internet Accounts so the data can start syncing.

OhMyZsh

Install the cli tool Oh My Zsh to boost your terminal with nice auto-completions, themes, plugins and much more. Follow the "Basic Installation" in their docs. Either go with the default theme or select one from the wiki Themes.

Homebrew

Install Homebrew, the missing package manager for macOS.

# list all installed brew packages
brew list

# list all brew services (running and stopped)
brew services list

Homebrew - Casks of Fonts

When Homebrew is installed, tap the Casks of Fonts and install the fonts you need.

# You only need to do this once!
brew tap homebrew/cask-fonts

# install the fonts
brew install font-inconsolata
brew install font-fira-code
brew install font-hack-nerd-font

Php

Install the latest or a specific version of Php.

# latest version
brew install php

# a specific version
brew install [email protected]

# Load the version of php you need in ~/.zshrc
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/opt/homebrew/opt/[email protected]/sbin:$PATH"

MariaDB

Install MySQL database distribution MariaDB.

brew install mariadb

# login with sudo/root - use your computer password!
sudo mysql -u root -p

# create new user
CREATE USER 'dev'@'localhost' IDENTIFIED BY 'dev';

# give privileges to new user "dev"
GRANT ALL PRIVILEGES ON * . * TO 'dev'@'localhost';

# don't forget to flush
FLUSH PRIVILEGES;

# logout
exit

# restart mariadb
brew services restart mariadb
# Stopping `mariadb`... (might take a while)
# ==> Successfully stopped `mariadb` (label: homebrew.mxcl.mariadb)
# ==> Successfully started `mariadb` (label: homebrew.mxcl.mariadb)

Composer

Download and install Composer, the package manager for php.
After the installation completes, follow the steps for a global install.

Laravel Valet

Make sure the Composer vendor dir is in your "PATH".

# add vendor dir to your PATH in: ~/.zshrc
export PATH="$PATH:$HOME/.composer/vendor/bin"

Install Laravel Valet.
When Valet is installed, setup your local projects like below.

# go to the web root of your project
cd ~/bucket/my-project/bedrock/web

# create symlinks
valet link borgenfalkskott-se
valet link borgenfalkskott-com

# create TLS certs
valet secure borgenfalkskott-se
valet secure borgenfalkskott-com

# list all valet sites
valet links

Node Version Manager

Install NVM so you can have multiple versions of Node/Npm installed at once and switch between them easily. Important! Don't install Node via Homebrew or the official installer, use NVM instead.

# After the installation completes, this should've been printed to your ~/.zshrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Git

Setup your global git settings so your commits are assigned to your user.
Git comes pre-installed with macOS.

git -v
# git version 2.39.3 (Apple Git-146)

# set a global username
git config --global user.name "your_username"

# get the global username
git config --global user.name

# set a global email
git config --global user.email "your_email"

# get the global email
git config --global user.email

SSH

Follow the guide on how to setup SSH config and adding new SSH keys.

Visual Studio Code

Download and install VS Code and add the extensions you need, from the list below.
Open them in VS Code Marketplace or check the "Recommended extensions" tab in VS Code.

Profile settings & key bindings

You can import/export different profiles in VS Code but it's kind of buggy on macOS and VS Code defaults back to the default profile every time you restart VS Code (bug?). So for that reason, we are replacing our default settings instead of importing a new profile, so we don't have switch profile all the time.

  1. Open VS Code with your default profile active and open settings cmd + ,.
  2. Search for the setting to show settings as json instead of ui: "workbench.settings.editor": "json".
  3. Open your settings again but this time it should open in json format.
  4. Copy and paste the contents of settings.json to your settings.json in VS Code and save.
  5. Open Settings -> Keyboard Shortcuts in VS Code and click the icon in the upper right to show keybindings as json format instead of ui.
  6. Copy and paste the contents of keybindings.json to your keybindings.json in VS Code and save.

VS Code: shell command

Install the VS Code shell command in your PATH to be able to open projects in VS Code from your terminal e.g. code my-project. Open the command palette in VS Code by pressing cmd + shift + p and search for Shell command: Install 'code' command in PATH and run it.

Terminal

Download and install iTerm2, for a more customizable terminal. Download and import a color scheme, I like the Dracula color sheme.

To prevent weird locale warnings when connecting to a VPS or similar, make sure to turn off the setting to set the locale automatically in Settings -> Profiles (Default) -> Terminal -> "Environment: Set locale variables automatically".

Additional software

A list of links to some of the tools I use or have used before.

Communication

Creative

Database

Development

Entertainment

Productivity

Misc

About

These are my dotfiles. Not much here and mainly for my own use. But you might find something good.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published