mac-setup Documentation

Installing Development environment on macOS

7,382 stars TypeScript TypeScript 52 files · ~26,799 tokens #fresh-installs#gitbook#guide#guidebook#hacktoberfest#install#installation#mac
RAW Doc

Technical Documentation: sb2nov/mac-setup

ℹ️ Provenance: Multi-Tier Ingestion · CodeWiki Reference

Overview (`README.md`)

[macOS Setup Guide](https://sourabhbajaj.com/mac-setup)

This guide covers the basics of setting up a development environment on a new
Mac. Whether you are an experienced programmer or not, this guide is intended
for everyone to use as a reference for setting up your environment or
installing languages/libraries.

Some environments we will set up are Node
(JavaScript), Python,
C++ and Ruby.
Even if you don't program in all of them, they are useful to have as many
command-line tools rely on them. We'll also show you some useful daily use
applications. As you read and follow these steps, feel free to post any
feedback or comments you may have.

Contributing to the guide

All contributions to the guide are welcome. Please help add support for other
libraries and languages. To make a contribution please use our contribution
template
.

We're looking for more contributors to maintain and extend the
documentation.


This guide is MIT
licensed
and has been
generated using Docusaurus. Feel free to contribute or
create new issues on GitHub.


Intro (`docs/intro.md`)


slug: / title: macOS Setup Guide id: intro

This guide covers the basics of setting up a development environment on a new
Mac. Whether you are an experienced programmer or not, this guide is intended
for everyone to use as a reference for setting up your environment or
installing languages/libraries.

Some environments we will set up are Node
(JavaScript), Python,
C++ and Ruby.
Even if you don't program in all of them, they are useful to have as many
command-line tools rely on them. We'll also show you some useful daily use
applications. As you read and follow these steps, feel free to post any
feedback or comments you may have.

Contributing to the guide

All contributions to the guide are welcome. Please help add support for other
libraries and languages. To make a contribution please use our contribution
template
.

We're looking for more contributors to maintain and extend the
documentation.


This guide is MIT
licensed
and has been
generated using Docusaurus. Feel free to contribute or
create new issues on GitHub.


Apps Index (`docs/apps/index.md`)


title: Other Apps

Here is a list of apps that are generally good to use and can come in handy in day to day tasks. The apps are separated into 4 broad categories Developer Tools, Productivity Tools, Office Apps and Other.

Development Tools

  • Brave Browser: A privacy-focused browser built on Chromium with built-in ad blocking and full Chrome DevTools.
  • Google Chrome: Chrome is a developer friendly browser with powerful development tools built in to it.
  • Warp: A modern terminal built on Rust with AI-powered command suggestions and collaborative features.
  • Cursor: An AI-powered code editor built on VS Code.
  • Zed: A high-performance code editor built in Rust with real-time collaboration.
  • GitHub Desktop: A GUI for Git that simplifies your development workflow.
  • Valentina Studio: Valentina Studio is a GUI to create, administer and query MySQL, Postgres and SQLite databases.

AI Tools

  • Claude: Anthropic's AI assistant desktop app.
  • Claude Code: An agentic coding tool from Anthropic that lives in your terminal.

Diff and Merge Tools

FileMerge: A free tool which is already installed on your machine. It might not be the most elegant tool, but it's definitely a solid one that does the job of comparing & merging text.

Beyond Compare: Not only can you compare text with this tool but it also supports diffing Word and PDF contents. In the Pro Version it also supports merging.

Araxis Merge: One of the few diff tools that works with more than just text and image files, this one lets you also compare office documents (like MS Word, Excel, PowerPoint, or ODF). A single license is valid for both Windows and Mac.

DeltaWalker: Just like Araxis, this app also lets you compare office files. However, it goes one step further by letting you compare file archives like ZIP, JAR, and TAR files. It also has great performance for comparing folders.

Free alternatives

Both of these tools can't compare in terms of features and user interface with their commercial competitors - but make for a valid alternative on Mac, Windows and Linux.

Productivity

  • 1Password: Cross platform password management tool.
  • Raycast: An extendable launcher and productivity tool. A modern alternative to Spotlight and Alfred.
  • Amphetamine: Stops the machine from going into sleep mode.
  • AppCleaner: Uninstall apps cleanly.
  • Dropbox: File syncing to the cloud. It syncs files across all devices (laptop, mobile, tablet), and serves as a backup as well!
  • Google Drive: File syncing to the cloud too! Google Docs is a popular tool to collaborate with others.
  • Rectangle: Don't waste time resizing and moving your windows. Rectangle makes this very easy and is open source.
  • Shottr: A small, fast, and feature-rich screenshot tool for Mac.
  • Pocket: Save For Later. Put articles, videos or pretty much anything into Pocket.
  • Timing: Keep track of the time you spend with your Mac.
  • Transmission: A fast, easy and free BitTorrent client.
  • Unarchiver: Compress/Uncompress app. Supported file formats include Zip, Tar-GZip, Tar-BZip2, RAR, 7-zip, LhA, StuffIt and many other old and obscure formats.

Communication

  • Slack: Team messaging and collaboration.
  • WhatsApp: Desktop client for WhatsApp messaging.
  • Spotify: Music streaming.

Office Apps

  • Keynote: Create presentations on Mac, this is supposed to be an alternate to PowerPoint.
  • Microsoft Office: Microsoft Office for Mac. Includes Microsoft Word, Excel, PowerPoint and Outlook.
  • Numbers: Create spreadsheets on Mac, this is supposed to be an alternate to Excel.
  • Pages: Create text files on Mac, this is supposed to be an alternate to Word.

Other

  • Skim: Skim is a PDF reader and note-taker for macOS.
  • SuperDuper: Take backups of your disk and use the backup disk to restore the machine in case of failure.
  • TimeOut: Scheduled work breaks to prevent stress injuries.
  • VLC: VLC Media Player. Enough said.

Docker Index (`docs/docker/index.md`)


title: Docker

Docker is a platform for developers and sysadmins to develop, ship, and run applications. Docker lets you quickly assemble applications from components and eliminates the friction that can come when shipping code. Docker lets you get your code tested and deployed into production as fast as possible.

With Docker, developers can build any app in any language using any toolchain. "Dockerized" apps are completely portable and can run anywhere - colleagues' macOS and Windows laptops, QA servers running Ubuntu in the cloud, and production data center VMs running Red Hat.

Installation

The recommended way to use Docker on macOS is via Docker Desktop.

Using Homebrew

sh
brew install --cask docker

Manual Download

Alternatively, download Docker Desktop from the official website.

Verify Installation

After installing and launching Docker Desktop, verify the installation:

sh
docker --version
docker run hello-world

You can find more about Docker in the documentation.


Git Index (`docs/git/index.md`)


title: Git

What's a developer without Git? To install, run:

sh
brew install git

When done, to test that it installed properly you can run:

sh
git --version

And which git should output /opt/homebrew/bin/git (Apple Silicon) or /usr/local/bin/git (Intel).

Git LFS

Git Large File Storage replaces large files with text pointers inside Git while storing the file contents on a remote server.

sh
brew install git-lfs
git lfs install

GitHub CLI

The GitHub CLI (gh) brings GitHub to your terminal. You can create PRs, review code, manage issues, and more without leaving the command line.

sh
brew install gh

Authenticate with your GitHub account:

sh
gh auth login

Next, we'll define your Git user (should be the same name and email you use for GitHub):

sh
git config --global user.name "Your Name Here"
git config --global user.email "[email protected]"

They will get added to your .gitconfig file.

To push code to your GitHub repositories, we will use the recommended HTTPS method. There are also instructions for using SSH. To prevent git from asking for your username and password every time you push a commit you can cache your credentials by running the following command, as described in the instructions.

sh
git config --global credential.helper osxkeychain

These instructions are from the official documentation.

Clone repositories using HTTPS

After creating a new repo on GitHub, clone it using:

sh
git clone https://github.com/<username>/<repo-name>.git

- if you had initialized with a README.

If you did not, follow the instructions in the section below.

Set up a new or existing repo with HTTPS for GitHub

If you are setting up a new repo, add at least one file and commit first. Then, configure the remote and push to GitHub by running:

sh
git remote add origin https://github.com/<username>/<repo-name>.git
git push -u origin main

SSH Config for GitHub

These instructions are for those who wish to use SSH and not HTTPS, and are from the official documentation.

Check for existing SSH keys

First check for existing SSH keys on your computer by running:

sh
ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist

Check the directory listing to see if you have files named either id_ed25519.pub or id_rsa.pub. If you don't have either of those files then read on, otherwise skip the next section.

Generate a new SSH key

If you don't have an SSH key you need to generate one. To do that you need to run the commands below, and make sure to substitute the placeholder with your email. The default settings are preferred, so when you're asked to enter a file in which to save the key, just press Enter to continue.

sh
ssh-keygen -t ed25519 -C "[email protected]"
# Creates a new ssh key, using the provided email as a label

Add your SSH key to the ssh-agent

Run the following commands to add your SSH key to the ssh-agent.

sh
eval "$(ssh-agent -s)"

Modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain:

ssh-config
Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

Then add your SSH key to the ssh-agent:

sh
ssh-add --apple-use-keychain ~/.ssh/id_ed25519

Adding a new SSH key to your GitHub account

The last step is to let GitHub know about your SSH key so GitHub can recognize you. Run this command to copy your key to your clipboard:

sh
pbcopy < ~/.ssh/id_ed25519.pub

Then go to GitHub and input your new SSH key. Paste your key in the "Key" text-box and pick a name that represents the computer you're currently using.

We are now ready to use SSH with GitHub!

Clone repositories using SSH

After creating a new repo on GitHub, clone it using

sh
git clone [email protected]:<username>/<repo-name>.git

- if you had initialized with a README.

If you did not, follow the instructions in the section below.

Set up a new or existing repo with SSH for GitHub

If you are setting up a new repo, add at least one file and commit first. Then, configure the remote and push to GitHub by running:

sh
git remote add origin [email protected]:<username>/<repo-name>.git
git push -u origin main

Homebrew Index (`docs/homebrew/index.md`)


title: Homebrew

Homebrew calls itself The missing package manager for
macOS
and is an essential tool for any developer.

Installation

Before you can run Homebrew you need to have the Command Line Tools for
Xcode
installed. It include compilers and other tools that will allow you
to build things from source. You can install it from the terminal
by running the following:

sh
xcode-select --install

To install Homebrew run the following in a terminal:

sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

hit Enter, and follow the steps on the screen.

Setting up your `PATH`

On Apple Silicon Macs (M1/M2/M3/M4), Homebrew installs to /opt/homebrew. The
installer will print instructions to add Homebrew to your PATH. Typically you
need to add this to your ~/.zprofile (or ~/.bash_profile if using Bash):

sh
eval "$(/opt/homebrew/bin/brew shellenv)"

On Intel Macs, Homebrew installs to /usr/local and is generally already on
your PATH.

Then, to be able to use brew you need to start a new terminal session. After that
you should make sure everything is working by running:

sh
brew doctor

If everything is good, you should see no warnings, and a message that you are
"ready to brew!".


Iterm Index (`docs/iterm/index.md`)


title: iTerm2

iTerm2 is an open source replacement for Apple's Terminal. It's highly customizable and comes with a lot of useful features.

Installation

Use Homebrew to download and install:

sh
brew install --cask iterm2

Customization

Colors and Font Settings

Here are some suggested settings you can change or set, they are all optional.

  • Set hot-key to open and close the terminal to command + option + i
  • Go to profiles -> Default -> Terminal -> Check silence bell to disable the terminal session from making any sound
  • Download one of iTerm2 color schemes and then set these to your default profile colors
  • Change the cursor text and cursor color to yellow make it more visible
  • Change the font to 14pt Source Code Pro Lite. Source Code Pro can be downloaded using Homebrew brew install --cask font-source-code-pro
  • If you're using BASH instead of ZSH you can add export CLICOLOR=1 line to your ~/.bash_profile file for nice coloring of listings

MacOS shortcuts ⌘←, ⌘→ and ⌥←, ⌥→

You might be familiar with shortcuts to skip a word (⌥) or go to start/end of the line (⌘). iTerm is not set up to work with these shortcuts by default but here's how you set them up:

Open up iTerm2 preferences (⌘ + ,) -> Profiles -> Keys -> Click on + icon (add new Keyboard shortcut).

shortcut action Esc+
⌘← Send Escape Sequence OH
⌘→ Send Escape Sequence OF
⌥← Send Escape Sequence b
⌥→ Send Escape Sequence f

Touch ID sudo workaround

If you have enabled sudo authentication with Touch ID you will also need to set Preferences -> Advanced -> Allow sessions to survive logging out and back in to No in iTerm2 preferences.


Java Index (`docs/java/index.md`)


title: Java

Using Java requires you to install a JDK ("Java Development Kit") or JRE ("Java Runtime Environment").
We'll use a JDK since it can do everything a JRE can, plus more.

Choosing a JDK

There are two major JDKs: OpenJDK and the Oracle JDK.
OpenJDK and Oracle JDK provide the same functionality, and are even built from the same code base.
They differ only in their packaging and licensing.

OpenJDK is free for use in all situations.
Oracle JDK requires a paid-for commercial license when used in a production setting.

Most personal users will probably want to use OpenJDK, since it's easier to acquire and install
and that's what we'll be covering here.

Installation

First you should check if Java is already installed

sh
java -version

If you see a non-empty output like below then Java is already installed on your machine and you are good to go

sh
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment Homebrew (build 21.0.2)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.2, mixed mode, sharing)

If you don't see the output like above then you need to install Java on your system

Installing OpenJDK

Installing OpenJDK using Homebrew

sh
brew install openjdk

If you're curious, you can list all the available JDK versions via:

sh
brew search jdk

There will be a lot of options here! If you are not a serious Java developer, don't worry about them, and just use the default openjdk.

Once you've done that, check if Java is correctly installed by running the java -version command again.

Downloading and installing OpenJDK manually

Open a web browser and go to Adoptium. Select the latest LTS version and download the installer for macOS.

Once you've done that, check if Java is correctly installed by opening a new Terminal session and running the java -version command again.


Python Index (`docs/python/index.md`)


title: Python

macOS ships with Python already installed.
But you don't want to mess with the system Python (some system tools rely on
it, etc.), so we'll install our own version(s). There are two ways to install
Python, (1) Homebrew and (2) Pyenv. If you plan to use multiple versions of
Python then you should use pyenv.

Installation

Homebrew method

sh
brew install python

Installing Python also installs pip
(and its dependency Setuptools),
which is the package manager for Python. Let's upgrade them both:

sh
pip3 install --upgrade setuptools
pip3 install --upgrade pip

Pyenv method

pyenv is a Python version manager that can
manage and install different versions of Python. Works very much like rbenv
for Ruby. First, we must install pyenv using Homebrew:

sh
brew install pyenv

To upgrade pyenv in the future, use upgrade instead of install. After
installing, add pyenv init to your shell to enable shims and autocompletion.
Add the following to your ~/.zshrc (or ~/.bash_profile if using Bash):

sh
eval "$(pyenv init -)"

Restart your shell to make sure the path changes take effect.

sh
exec $SHELL

You can now begin using pyenv. To list the all available versions of Python,
including Anaconda, Jython, PyPy and Stackless, use:

sh
pyenv install --list

Then install the desired versions:

sh
pyenv install 3.12
pyenv install 3.11

Use the global command to set global version(s) of Python to be used in all
shells:

sh
pyenv global 3.12
pyenv rehash

All installed Python versions can be
located in ~/.pyenv/versions. Alternatively, you can run:

console
$ pyenv versions
  system (set by /Users/your_account/.pyenv/version)
* 3.12
  3.11

This shows an asterisk * next to the currently active version.

Application-specific Python version

The local command will set local application-specific Python version(s) by
writing the version name to a .python-version file in the current directory.
This version overrides the global version. For example:

console
$ cd path/to/directory
$ pyenv local 3.11
$ pyenv versions
  system
  3.12
* 3.11 (set by /Users/your_account/path/to/directory/.python-version)

Ruby Index (`docs/ruby/index.md`)


title: Ruby

macOS comes with Ruby installed, but as we don't want to be messing with operating system core files we're going to use the tools rbenv and ruby-build to manage and install our Ruby versions for our development environment.

Installation

sh
brew install rbenv ruby-build rbenv-default-gems rbenv-gemset
echo 'eval "$(rbenv init -)"' >> ~/Projects/config/env.sh
source ~/.zshrc # Apply changes

The packages we just installed allow us to install different versions of Ruby and specify which version to use on a per project basis and globally. This is very useful to keep a consistent development environment if you need to work in a particular Ruby version.

Switching versions

We can install version 3.1.1 and use it as our global version by running:

sh
rbenv install 3.1.1
rbenv global 3.1.1

On M1 Macs to install older version of Ruby eg. <2.7.3, <2.6.7 you first need to run:

sh
export optflags="-Wno-error=implicit-function-declaration"

Managing gems in application

Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.

sh
gem install bundler
echo 'bundler' >> "$(brew --prefix rbenv)/default-gems"

When starting a Ruby project, you can have sandboxed collections of gems. This lets you have multiple collections of gems installed in different sandboxes, and specify (on a per-application basis) which sets of gems should be used. To have gems install into a sub-folder in your project directory for easy later removal / editing / testing, you can use a project gemset.

sh
echo '.gems' > <my_project_path>/.rbenv-gemsets

Your gems will then get installed in project/.gems.

Configuration

If you use Google for finding your Gem documentation then you might want to consider saving a bit of time when installing gems by not including the documentation.

sh
echo 'gem: --no-document' >> ~/.gemrc

Sublime Text Index (`docs/sublime-text/index.md`)


title: Sublime Text

Sublime Text is a widely used editor that describes it self as a sophisticated text editor for code, markup and prose.

Installation

Install using Homebrew:

sh
brew install --cask sublime-text

Or download the .dmg file and drag-and-drop it to the Applications folder.

Use CLI to open file

Let's create a shortcut through which we can launch Sublime Text from the command-line

sh
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

Now you can open a file with subl myfile.py or start a new project in the current directory with subl ..

Pricing

Sublime Text is not free but it has an unlimited evaluation period that comes with notification pop-ups asking you to buy it, if you wish to remove the pop-ups you can purchase the tool here.


Bash Completion (`docs/bash-completion.md`)


title: Bash Completion

Bash completion is a bash function that allows you to auto complete commands or
arguments by typing partially commands or arguments, then pressing the [Tab]
key. This will help you when writing the bash command in terminal.

Install Latest Bash

macOS ships with an outdated version of Bash (3.2). You can install the latest
version using Homebrew:

sh
brew install bash

To use the Homebrew-installed Bash as your default shell, add it to the list of
allowed shells and set it:

sh
sudo sh -c 'echo "$(brew --prefix)/bin/bash" >> /etc/shells'
chsh -s "$(brew --prefix)/bin/bash"

Installation

Use bash-completion@2, which is designed for Bash 4.2+ (the version installed
by Homebrew):

sh
brew install bash-completion@2

For it to work, add this to your ~/.bash_profile:

sh
[[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh"

Restart your bash session:

sh
source ~/.bash_profile

Usage

Once you've done this, you can use bash completion by pressing the tab key
twice after a command. For example:

console
$ git [tab] [tab]
add            blame          cherry-pick    config         format-patch   gui            merge          push           repack         rm             stage          whatchanged
am             branch         citool         describe       fsck           help           mergetool      range-diff     replace        send-email     stash          worktree
apply          bundle         clean          diff           gc             init           mv             rebase         request-pull   shortlog       status
archive        checkout       clone          difftool       gitk           instaweb       notes          reflog         reset          show           submodule
bisect         cherry         commit         fetch          grep           log            pull           remote         revert         show-branch    tag

More

You can list additional completion packages available by typing:

sh
brew search completion

And you can install them using brew install commands, for example:

sh
brew install docker-completion

Contributors (`docs/contributors.md`)


title: Contributors

Thank you to everyone who has contributed to creating this awesome guide! 🎉

This project exists thanks to all the people who contribute:

simeg sb2nov hugovk nicolashery Kyslik kamleshkc2002
otkd AidHamza michaelbeil pomverte apjanke luce-carevic
ahmadnurus Clifton893 echernyavskiy rohitjmathew sebastianwebber viniciusbig
at15 adolgiy ylt6 raavanan mateuszroth jgreely
snood1205 sdavara ShayMe21 tychobrailleur vmalyi williambelle
paicha OmgImAlexis vishrutkmr7 ValentinTrinque ztlevi tiwu
TamarIS sofyan-ahmad shen-tian sahildua2305 robindboer rkday
barmanrajdeep phillipalexander pwallrich pelmered cignoni nkapliev
ghostwriternr woutercx sslees srhrshr shanmoon rowmatrix
pacahon yagudin marfarma wolfcode jsingh-coursera garanaveen
ecmarsh davidpeterh dlionz derekprice anthuan44 yogeshg
yawaramin fpinzn falkirks einert deyton deepakjadhav288
cHemingway chengweiv5 bitdeli-chef bsheikh Potherca GuGuss
apicgg antonioalmeida Switchxa AlanI-xx WHFF521 hisabimbola
alichtman naman jk2K LeonardAukea adelowo kaveet
krambertech kasperpeulen jsingh41 rastalamm jfloff josephfrazier
thederputy quackduck sspkmnd veteranbv pgilad gianpaj
Frederick-S

103 contributors • 653 total contributions


Want to contribute? Check out our contribution guidelines and help make this guide even better!


Cpp (`docs/cpp.md`)


title: C++

Make sure you have installed Xcode Command Line Tools. Verify the compiler is available:

console
$ c++ --version
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: arm64-apple-darwin24.3.0
Thread model: posix

To be able to compile files from your terminal you can add the following alias in your shell configuration file (e.g. ~/.zshrc).

sh
alias cppcompile='c++ -std=c++17 -stdlib=libc++'

Then you can run all cpp file directly using cppcompile main.cpp and it will use C++17.


Emacs (`docs/emacs.md`)


title: Emacs

Emacs is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as the extensible, customizable, self-documenting, real-time display editor.

Development of the first Emacs began in the mid-1970s, and work on its direct descendant, GNU Emacs, continues actively.

Installation

There are many Emacs clients on macOS. The recommended version on macOS is Emacs Mac Port, but others are good as well.

Many useful features are built with Emacs Mac Port, e.g. environment variables, full screen, visual enhancements and so on.

Link the Homebrew tap first.

sh
brew tap railwaycat/emacsmacport
  • Method 1: Install with brew cask.
sh
brew install --cask emacs-mac

There are three available versions, emacs-mac, emacs-mac-official-icon, emacs-mac-spacemacs-icon.

  • Method 2: Install using brew.
sh
brew install emacs-mac [options]

Click here to see available options:

  1. --with-dbus, Build with d-bus support
  2. --with-modules, Build with dynamic modules support
  3. --with-xml2, Build with libxml2 support
  4. --with-ctags, Don't remove the ctags executable that emacs provides
  5. --with-no-title-bars, Build with a patch for no title bars on frames (--HEAD is not supported)
  6. --with-natural-title-bar, Build with a patch for title bar color inferred by your theme (--HEAD is not supported). More info is provided here
  7. --with-official-icon, Using official Emacs icon
  8. --with-modern-icon, Using a modern style Emacs icon by @tpanum
  9. --with-spacemacs-icon, Using the spacemacs Emacs icon by Nasser Alshammari
  10. --with-icon-for-documents, Using official icon for documents which default open with Emacs

[Emacs plus](https://github.com/d12frosted/homebrew-emacs-plus#emacs-plus)

Start off by tapping the official emacs-plus cask.

sh
brew tap d12frosted/emacs-plus

Install the latest version of Emacs Plus:

sh
brew install emacs-plus [options]

You can also install specific versions (e.g. emacs-plus@29, emacs-plus@30).

Click here to see available options:

  1. --with-24bit-color: Experimental: build with 24 bit color support
  2. --with-ctags: Don't remove the ctags executable that Emacs provides
  3. --with-dbus: Build with dbus support
  4. --with-mailutils: Build with mailutils support
  5. --with-natural-title-bar: Experimental: use a title bar colour inferred by your theme
  6. --with-no-title-bars: Experimental: build with a patch for no title bars on frames (--HEAD has this built-in via undecorated flag)
  7. --with-x11: Experimental: build with x11 support
  8. --without-cocoa: Build a non-Cocoa version of Emacs
  9. --without-gnutls: Build without gnutls support
  10. --without-imagemagick@6: Build without imagemagick@6 support
  11. --without-librsvg: Build without librsvg support
  12. --without-libxml2: Build without libxml2 support
  13. --without-modules: Build without dynamic modules support
  14. --without-multicolor-fonts: Build without a patch that enables multicolor font support
  15. --without-spacemacs-icon: Build without Spacemacs icon by Nasser Alshammari
  16. --HEAD: Install HEAD version

Note: 1) You might want to install exec-path-from-shell if you are using Emacs plus. It takes care of your environment variables.
2) To have the title bar match your theme background color, consider using instead:
brew install emacs-plus --HEAD --with-natural-title-bars

Spacemacs

Spacemacs is a new way to experience Emacs -- a sophisticated and polished set-up focused on ergonomics, mnemonics and consistency.

Spacemacs can be used naturally by both Emacs and Vim users -- you can even mix the two editing styles. Switching easily between input styles makes Spacemacs a great tool for pair-programming.

Installation

  1. If you have an existing Emacs configuration, back it up first:

    sh
    cd ~
    mv .emacs.d .emacs.d.bak
    mv .emacs .emacs.bak

    Don't forget to backup and remove ~/.emacs file otherwise Spacemacs
    WILL NOT load since that file prevents Emacs from loading the proper
    initialization file.

  2. Clone the repository:

    sh
    git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

    master is the stable branch and it is immutable, DO NOT make any
    modification to it or you will break the update mechanism. If you want to
    fork Spacemacs safely use the develop branch where you handle the update
    manually.

  3. (Optional) Install the Source Code Pro font.

    If you are running in terminal you'll also need to change font settings of
    your terminal.

  4. Launch Emacs. Spacemacs will automatically install the packages it requires.
    If you get an error regarding package downloads then you may try to disable
    the HTTPS protocol by starting Emacs with

    sh
    emacs --insecure

    Or you can set the dotspacemacs-elpa-https to nil in your dotfile to
    remove the need to start Emacs with --insecure argument. You may wish to
    clear out your .emacs.d/elpa directory before doing this, so that any
    corrupted packages you may have downloaded will be re-installed.

  5. Restart Emacs to complete the installation.

Purcell's Emacs configuration

This is Purcell's emacs configuration tree, continually used and tweaked since 2000, and it may be a good starting point for other Emacs users, especially those who are web developers. These days it's somewhat geared towards macOS, but it is known to also work on Linux and Windows.

Installation

To install, clone this repository to ~/.emacs.d, i.e. ensure that the init.el contained in this repository ends up at ~/.emacs.d/init.el:

sh
git clone https://github.com/purcell/emacs.d.git ~/.emacs.d

Upon starting up Emacs for the first time, further third-party packages will be automatically downloaded and installed. If you encounter any errors at that stage, try restarting Emacs, and possibly running M-x package-refresh-contents before doing so.

Doom Emacs

Doom Emacs is a configuration framework for GNU Emacs. It can be considered a hacker's starter kit.

Installation

sh
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
~/.config/emacs/bin/doom install

Visit the documentation for a more detailed guide on installing and customizing Doom.


Go (`docs/go.md`)


title: Go

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Installation

You can follow the official instructions on how to install Go, or you can use Homebrew instead:

sh
brew install go

When installed, run go version to see the installed version of Go.

Add GOPATH/bin directory to your PATH environment variable so you can run Go programs anywhere. Add this to your ~/.zshrc (or ~/.bash_profile):

sh
export PATH=$PATH:$(go env GOPATH)/bin

Write your first program

Modern Go uses modules for dependency management. Create a new project:

sh
mkdir hello && cd hello
go mod init hello

Create a file main.go:

go
package main

func main() {
    println("Hello World!")
}

Run the program by running:

console
$ go run .
Hello World!

Import a Go package

With Go modules, you simply import packages in your code and run go mod tidy to download them:

go
package main

import (
    "github.com/gorilla/mux" // Your imported package
    "net/http"
)

func yourHandler(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("Gorilla!\n"))
}

func main() {
    r := mux.NewRouter()
    // Routes consist of a path and a handler function.
    r.HandleFunc("/", yourHandler)

    // Bind to a port and pass our router in
    panic(http.ListenAndServe(":8000", r))
}

Then run:

sh
go mod tidy

This will automatically download and add the dependency to your go.mod file.

Tooling and learning

Format your code

Go has a built-in tool that automatically formats Go source code.

To format a single file run:

sh
gofmt -w yourcode.go

You can also format an entire package:

sh
go fmt path/to/your/package

Learn more

The interactive tutorial will let you learn more about Go.


Heroku (`docs/heroku.md`)


title: Heroku

Heroku is a Platform-as-a-Service (PaaS) that simplifies deploying your apps online.

Installation

Assuming you have a Heroku account (sign up if you don't), let's install the Heroku Client for the command-line using Homebrew.

sh
brew install heroku/brew/heroku

The formula might not have the latest version of the Heroku Client, which is updated pretty often. Let's update it now:

sh
heroku update

Don't be afraid to run heroku update every now and then to always have the most recent version.

Setup

Login to your Heroku account using your email and password:

sh
heroku login

If this is a new account, and since you don't already have a public SSH key in your ~/.ssh directory, it will offer to create one for you. It will also upload the key to your Heroku account, which will allow you to deploy apps from this computer.

If it didn't offer create the SSH key for you (i.e. your Heroku account already has SSH keys associated with it), you can do so manually by running:

sh
mkdir ~/.ssh
ssh-keygen -t rsa

Keep the default file name and skip the passphrase by just hitting Enter both times. Then, add the key to your Heroku account:

sh
heroku keys:add

Usage

Once your keys are in place and you are authorized, you're ready to deploy apps. Heroku has a getting started guide, which has all the information you need (the one linked here is for Python, but there is one for every popular language). Heroku uses Git to push code for deployment, so make sure your app is under Git version control.

A cheat sheet for deployment:

console
$ cd myapp/

# Create the app on Heroku
$ heroku create myapp

# Deploy it
$ git push heroku master

# Check its status
$ heroku ps

# Check the logs
$ heroku logs -t

The Heroku Dev Center is where you will find more information.


Jetbrains Ides (`docs/jetbrains-ides.md`)


title: JetBrains IDEs

JetBrains is a company creating tools for developers. Their mission is: We make professional software development a more productive and enjoyable experience. In this section a number of IDEs (integrated development environment) as well as a selection of features will be presented.

Selection of Features

Note that these features apply to all IDEs mentioned.

Shared Key Mappings

If you use different programming languages you might also use different IDEs/editors. This forces you to learn different key mappings for each individual IDE/editor. With IDEs from JetBrains you only need to learn one key mapping because it's shared between all of their IDEs. If you customize your key mapping you can even export it from one IDE and import in the other one.

Highly Customizable

Not only can you do lots of customization when it comes to appearance, key mapping and a lot more, you also have plugins. These plugins cover everything from dealing with different file types to using external tools such as Git, Docker, databases, linters and time tracking. JetBrains offer a bunch of their own plugins but you can also develop and publish your own plugins.

Integrated Tools

Their IDEs offer so many tools that you never have to leave it if you don't want to. It supports a number of different VCSs (Git, Subversion, Perforce etc.), a terminal window, database browser, debuggers, SSH sessions and more.

Powerful Refactoring

Rename a method used all over your project with a few clicks, or change a method signature in the same way. With statically typed languages like Java and C the refactoring becomes even more powerful.

Useful Shortcuts

  • Search for a file -- CMD + SHIFT + O
  • Search for a string -- CMD + SHIFT + F
  • Search everything, press SHIFT two (2) times
  • Context based action -- ALT + ENTER (this one is very contextual, you have to just try it out having your cursor in different places)
  • Refactor this -- CTRL + T (place your cursor on what you want to refactor)

Supported Languages

Their IDEs support a number of languages, here's a list covering all of the listed ones sorted alphabetically.

  • C, C#, C++
  • CSS, Less, Sass, Stylus
  • F#
  • Go
  • Groovy
  • Java
  • JavaScript, TypeScript
  • Kotlin
  • Objective-C
  • PHP
  • Python
  • Ruby
  • Scala
  • SQL
  • Swift
  • VB.NET

They offer support for more languages using plugins such as Rust, Dart, Haxe, Markdown, Pug/Jade, Slim, Twig and more.

Installation

Go to their website and select what product you'd like to download.

Alternatively, use the Jetbrains Toolbox App to manage product installations.

Pricing

If you're a student or an instructor (teaching staff members) all IDEs from JetBrains are free to use. You can read more on their website. If you're not a student they still offer a few free Community Edition (CE) IDEs. Check out IntelliJ (Java) or PyCharm Edu.

If you as an individual want to have an IntelliJ subscription, for example, it's €14.90/$14.90 every month. Before buying a subscription you should see if you apply for a free/discounted license.


Latex (`docs/latex.md`)


title: LaTeX

LaTeX, which is pronounced «Lah-tech» or «Lay-tech», is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

Installation

When installing LaTex, two following options are given to users:

  1. Install MacTeX with builtin editor (TexLive) - (3.2GB)
  2. Install BasicTeX only (100MB) + your personal LaTeX editor

MacTeX vs BasicTeX

MacTeX includes additional programs such as an editor and a BibTeX reference manager that help users to work with TeX outside of the command line. BasicTeX does not include these GUI programs. The trade-off that comes with using BasicTeX is that you will have to download and install additional packages and programs as the need arises- and BasicTeX is so basic that the need will arise. So, after installing BasicTeX you will be faced with the tasks of installing additional programs and installing missing packages.

MacTex

Download MacTex, or use brew install --cask mactex.
You can read more about MacTex in What is installed (pdf).

Since MacTex installs a LaTex editor (TexMaker) already, installing another LaTeX editor is unnecessary.

BasicTeX

Download BasicTeX, or use brew install --cask basictex. You can read more about BasicTex in BasicTeX (pdf).

You may use tlmgr to install tools/packages that you need.

Note: You may find CLI tool tlmgr cumbersome to use, in that case install GUI for tlmgr - TeX Live Utility - brew install --cask tex-live-utility.

Now you should pick a LaTeX editor, here are some to choose from:

  1. TexMaker
  2. TeXstudio
  3. TeXworks
  4. TeXShop
  5. LyX
  6. TeXlipse
  7. Sublime Text 3 - LaTeXTools
  8. Visual Studio Code - LaTeX-Workshop

Note: You may want to use a PDF reader that watches your PDF files, like Skim (can be installed by brew install --cask skim and Sync feature can be enabled in Preferences -> Sync).


Mysql (`docs/mysql.md`)


title: MySQL

Installation

We will install MySQL using Homebrew, which will also install some header files needed for MySQL bindings in different programming languages (MySQL-Python for one).

sh
brew install mysql

Usage

To have launchd start MySQL now and restart at login:

sh
brew services start mysql

Or, if you don't want/need a background service you can just use the mysql.server tool:

sh
mysql.server start

To stop it when you are done, run:

sh
mysql.server stop

You can see the different commands available for mysql.server with:

sh
mysql.server --help

To connect with the command-line client, run:

sh
mysql -uroot

(Use exit to quit the MySQL shell)

Note: By default, the MySQL user root has no password. It doesn't really matter for a local development database. If you wish to change it though, you can use mysqladmin -u root password 'new-password'.


Nodejs (`docs/nodejs.md`)


title: Node.js

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.

Installation

Using Homebrew

sh
brew install node

Using Node Version Manager (nvm)

Download and install nvm by running:

sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

or via Homebrew:

sh
brew install nvm

Then download Node and select your version by running:

sh
source ~/.bashrc        # source your bashrc/zshrc to add nvm to PATH
command -v nvm          # check the nvm use message
nvm install node        # install most recent Node stable version
nvm ls                  # list installed Node version
nvm use node            # use stable as current version
nvm ls-remote           # list all the Node versions you can install
nvm alias default node  # set the installed stable version as the default Node

See the documentation for information.

npm usage

To install a package:

sh
npm install <package> # Install locally
npm install <package> # Install globally

To see what's installed:

sh
npm list [-g]

To find outdated packages:

sh
npm outdated [-g]

To upgrade all or a particular package:

sh
npm update [-g] [<package>]

To uninstall a package:

sh
npm uninstall [-g] <package>

yarn

Yarn is another package manager built by Facebook. Yarn stands for Yet Another
Resource Negotiator. It provides similar functionalities as NPM. It is an
alternative to NPM when installing, uninstalling, and managing package
dependencies from the NPM registry or GitHub repositories.

sh
brew install yarn

Postgresql (`docs/postgresql.md`)


title: PostgreSQL

PostgreSQL is an open source relational database management system (RDBMS). It is the default database for macOS server.

Installation

sh
brew install postgresql

After this, we can test the installation status by checking the version of installed PostgreSQL

sh
postgres -V

Usage

Start PostgreSQL server

The recommended way to manage PostgreSQL is via Homebrew services:

sh
brew services start postgresql

This starts the server now and also sets it to start automatically at login.

Stop PostgreSQL server

sh
brew services stop postgresql

Restart PostgreSQL server

sh
brew services restart postgresql

Start PostgreSQL console

sh
psql postgres

GUI tool

Postico is a popular GUI client for PostgreSQL on macOS. Alternatively, TablePlus supports PostgreSQL and many other databases.


References (`docs/references.md`)


title: References

Thank you for all the awesome pages and documentation below which helped set this up.

Contributing

Please feel free to send Pull Requests fixing any mistakes in the guide or adding additional information.


Rust (`docs/rust.md`)


title: Rust

Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.

Installation

For installation it's advised to use rustup as it will (among other things)
allow you to switch between versions of Rust without having to download
anything additional.

sh
brew install rustup-init

Use rustup to install the Rust compiler (rustc) and the Rust package manager (cargo).

sh
rustup-init

To verify you can run:

sh
rustc --version

The official documentation on how to install Rust.


Scala (`docs/scala.md`)


title: Scala

Make sure you have Java installed, the instructions are provided here.

Installation

sh
brew install scala sbt

Verify the installation:

sh
scala -version

IDE Support

For Scala development, IntelliJ IDEA with the Scala plugin is the most popular choice. Alternatively, VS Code with the Metals extension provides good Scala support.


Security (`docs/security.md`)


title: Security

A development machine should be secured against threats as well as any other machine (or even especially a development machine). Therefore we will setup

  • a firewall
  • disk encryption

Firewall

If you run potentially vulnerable software you don't want to be accessed from other machines, consider turning the built-in firewall on. This particularly applies if you develop network software.

To turn the built-in firewall on:

  1. Choose Apple menu () > System Settings, then click Network.
  2. Click Firewall.
  3. Turn on Firewall.
  4. Click Options to configure which apps are allowed incoming connections.

Note: On macOS versions before Ventura, this is under System Preferences > Security & Privacy > Firewall.

Disk Encryption

If you travel a lot and take your notebook with you (including all your source codes), you should enable disk encryption.

The following steps were taken from the official apple support page on this:

  1. Choose Apple menu () > System Settings, then click Privacy & Security.
  2. Scroll down to the FileVault section.
  3. Click Turn On FileVault.
  4. Follow the instructions. You should create a local and offline possibility to disable encryption, when you are asked how to regain access in case of anything.

Note: On newer Apple Silicon Macs, data encryption is enabled by default.


System Preferences (`docs/system-preferences.md`)


title: System Settings

First Time Setup

The first thing you should do is update your system. To do that go:
Apple menu () > System Settings > General > Software Update.

Also upgrade your OS to the latest version to have a more secure OS. macOS
upgrades are usually free so you might as well keep your machine up to date.

If this is a new computer there are a couple tweaks you could make to the
System Settings. These settings are all optional, consider them
suggestions. Always choose the setting that makes the most sense to you.

Note: On macOS Ventura (13) and later, "System Preferences" has been
renamed to "System Settings" with a redesigned interface.

Users & Groups

  • Login Options -> Change fast user switching menu as Icon
  • Set up Password, Apple ID, Picture, etc.

Trackpad

  • Point & Click
    • Enable Tap to click with one finger
    • Change Secondary click to Right corner
    • Uncheck Three Finger Drag
  • Scroll & Zoom
    • Uncheck all apart from Zoom in and out

Dock

  • Visual Settings
    • Change position to Left and make the size of icons Small
  • Other settings
    • Remove workspace auto-switching by running the following command:
sh
defaults write com.apple.dock workspaces-auto-swoosh -bool NO
killall Dock # Restart the Dock process

Finder

  • General
    • Change New finder window show to open in your Home Directory
  • Sidebar
    • Add Home and your Code Directory
    • Uncheck all Shared boxes
  • Remove the Display and Bluetooth icons
  • Change battery to Show percentage symbols

Spotlight

  • Uncheck fonts, images, files etc.
  • Uncheck the keyboard shortcuts as we'll be replacing them with
    Raycast

Accounts

  • Add an iCloud account and sync Calendar, Find my Mac, Contacts etc.

User Defaults

  • Enable repeating keys by pressing and holding down keys: defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false (and restart any app
    that you need to repeat keys in)
  • Change the default folder for screenshots
    • Open the terminal and create the folder where you would like to store
      your screenshots: mkdir -p /path/to/screenshots/
    • Then run the following command: defaults write com.apple.screencapture location /path/to/screenshots/ && killall SystemUIServer

Security & Privacy

  • Set Require Password ... after sleep or screen saver begins to immediately
  • Enable FileVault to encrypt your hard drive
  • Turn on Firewall

Vagrant (`docs/vagrant.md`)


title: Vagrant

Create and configure lightweight, reproducible, and portable development environments. Vagrant is a tool for managing virtual machines via a simple to use command line interface.

Note: For most use cases, Docker is now the preferred way to create
reproducible development environments. Vagrant is still useful when you need
full virtual machines.

Installation

Vagrant uses a virtualization provider. You can use VirtualBox (free) or other providers like VMware or Parallels.

sh
brew install --cask virtualbox

Now install Vagrant:

sh
brew install --cask vagrant

Usage

Add the Vagrant box you want to use. We'll use Ubuntu 22.04 for the following example.

sh
vagrant box add ubuntu/jammy64

You can find more boxes at Vagrant Cloud.

Now create a test directory and cd into the test directory. Then we'll initialize the vagrant machine.

sh
vagrant init ubuntu/jammy64

Now lets start the machine using the following command.

sh
vagrant up

You can ssh into the machine now.

sh
vagrant ssh

Halt the vagrant machine now.

sh
vagrant halt

Other useful commands are suspend and destroy.


Vim (`docs/vim.md`)


title: Vim

Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple macOS.

Installation

To install the latest version, use homebrew:

sh
brew install vim

The Ultimate vimrc

The Ultimate vimrc is a collection of vimrc configurations to make easy the usage of vim.

To download the The Ultimate vimrc, you need to install the git client. If you need install it, use home brew:

sh
brew install git

Now, download the vimrc files:

sh
git clone https://github.com/amix/vimrc.git ~/.vim_runtime

To install the complete version, run:

sh
sh ~/.vim_runtime/install_awesome_vimrc.sh

To install the basic version, run:

sh
sh ~/.vim_runtime/install_basic_vimrc.sh

Update

To update the vimrc scripts, run:

sh
cd ~/.vim_runtime && git pull --rebase && cd -

Maximum Awesome

Maximum Awesome is a collection of vim configuration and plugins, like a configuration manager for the vim environment.

Installation

To install it, just make a clone of the repository with the git client:

sh
git clone https://github.com/square/maximum-awesome.git

Then install it:

sh
cd maximum-awesome
rake

NOTE: the rake command will install all dependencies needed.


Visual Studio Code (`docs/visual-studio-code.md`)


title: Visual Studio Code

Visual Studio Code is a lightweight code editor with support for many programming languages through extensions

Installation

To install the latest version, use Homebrew:

sh
brew install --cask visual-studio-code

macOS integration

Launch VS Code from the command line.

After that, you can launch VS Code from your terminal:

  • code . will open VS Code in the current directory
  • code myfile.txt will open myfile.txt in VS Code

Useful Extensions

Python

  • Python - Python code highlighting

    To enable auto-formatting on "Save", i.e. ⌘ + S, configure the following:

    1. Change the default formatter to Black instead of Autopep8. Critical to avoid large diffs. Go to Preferences -> User Settings and update the setting python.formatter.provider to Black

    2. Enable Format on Save Setting: Editor: Format On Save setting on Code -> Preferences -> Settings

JavaScript

  • ESLint - Useful to check JavaScript errors and helps in auto-formatting the code
  • Prettier - JavaScript code formatter

SQL

Markdown

GitLens

  • GitLens - Supercharge the Git capabilities built into VSCode

Docker

  • Docker - Create, manage, and debug images from within VSCode

JSON

  • Paste JSON as Code - Infers types from sample JSON data, then outputs strongly typed models and serializers for working with that data in your desired programming language

Live Server

  • Live Server - Launches a local development server with live reloading for both static and dynamic

VS Code Icons

  • vscode-icons - Adds unique icons to distinguish different file extensions (easier to glance through your directories)

Xcode (`docs/xcode.md`)


title: Xcode

Xcode is an integrated development environment for macOS containing a suite of software development tools developed by Apple for developing software for macOS, iOS, watchOS and tvOS.

Download and install it from the App Store or from Apple's website.

For installing Xcode command line tools run:

sh
xcode-select --install

It'll prompt you to install the command line tools. Follow the instructions and you'll have Xcode and Xcode command line tools both installed.

XQuartz

XQuartz is Apple Inc.'s version of the X server, a component of the X Window System for macOS. It might be useful if you are developing software that uses X11, it's available for download here or via Homebrew:

sh
brew install --cask xquartz

Apps Octave (`docs/apps/octave.md`)


title: Octave

Octave is a programming language for scientific computing.

Prerequisite

You might need homebrew-cask; if you don't have it, refer to this section.

Installation

Homebrew Octave.app

Octave.app is a project to distribute GNU Octave as a native Mac GUI application, to make it easier to install and use Octave on macOS. Note this is not an official GNU or GNU Octave project.
As this distributes a compiled version of Octave, installation will be much faster.

To install using homebrew-cask run:

sh
brew tap octave-app/octave-app
brew install --cask octave-app

Homebrew official

You can also install Octave from the official Homebrew source using the method below.

Install octave from core Homebrew (which is available by default):

sh
brew install octave

Note: If brew complains about not having a formula for Octave, the following command should fix it:

sh
brew tap --repair

The command below upgrades Octave and its dependencies to the latest Homebrew-supported versions:

sh
brew update && brew upgrade

Octave has many dependencies which will be downloaded and installed prior to Octave. The entire installation process can take a few hours if you are compiling from source.

Note: On Snow Leopard or earlier, Octave requires an X server. You can download one from the XQuartz project.

You might find that you need to add:

sh
setenv ("GNUTERM", "X11")

to your octaverc file, normally located at /usr/local/share/octave/site/m/startup.


Apps Settings (`docs/apps/settings.md`)


title: App Settings

These settings are optional. Some of them are highly subjective and should not be considered as the best settings. To each is own.

Airmail

  • Add all the accounts into airmail
  • Update icons and signatures for all the accounts
  • Add alias for all the forwarding addresses
  • Change appearance to minimal

CheatSheet

  • System Preferences -> Security and Privacy -> Accessibility -> Check

DoubleTwist

  • Add the music folder to the library

Spectacle

  • Update all major combinations to work with Shift + Control + 1-9
  • Remove the key combinations for the other sizes
  • System Preferences -> Security and Privacy -> Accessibility -> Check

Timing

  • System Preferences -> Security and Privacy -> Accessibility -> Check

Docker Tips And Tricks (`docs/docker/tips-and-tricks.md`)


title: Tips and Tricks

A collection of useful tips and tricks for Docker.

Delete all containers

NOTE: This will remove ALL your containers.

sh
docker container prune

OR, if you're using an older docker client:

sh
docker rm $(docker ps -a -q)

Delete all untagged containers

sh
docker image prune

OR, if you're using an older docker client:

sh
docker rmi $(docker images | grep '^<none>' | awk '{print $3}')

See all space Docker take up

sh
docker system df

Get IP address of running container

sh
docker inspect [CONTAINER ID] | grep -wm1 IPAddress | cut -d '"' -f 4

Kill all running containers

sh
docker kill $(docker ps -q)

Docker Useful Commands (`docs/docker/useful-commands.md`)


title: Useful Commands

Here follows a list of useful Docker commands with useful flags for each
command.

Table of Contents

  1. docker build
  2. docker exec
  3. docker images
  4. docker inspect
  5. docker logs
  6. docker ps
  7. docker rmi
  8. docker run
  9. Learn More

[`docker build`](https://docs.docker.com/engine/reference/commandline/build/)

Build an image from a Dockerfile.

sh
docker build [DOCKERFILE PATH]

Example

Build an image tagged my-org/my-image where the Dockerfile can be found at
/tmp/Dockerfile.

sh
docker build -t my-org:my-image -f /tmp/Dockerfile

Useful flags

  • --file -f Path where to find the Dockerfile
  • --force-rm Always remove intermediate containers
  • --no-cache Do not use cache when building the image
  • --rm Remove intermediate containers after a successful build (this is
    true) by default
  • --tag -t Name and optionally a tag in the ‘name:tag’ format

[`docker exec`](https://docs.docker.com/engine/reference/commandline/exec/)

Execute a command inside a running container.

sh
docker exec [CONTAINER ID]

Example

sh
docker exec [CONTAINER ID] touch /tmp/exec_works

Useful flags

  • --detach -d Detached mode: run command in the background
  • -it This will not make the container you started shut down immediately, as
    it will create a pseudo-TTY session (-t) and keep STDIN open (-i)

[`docker images`](https://docs.docker.com/engine/reference/commandline/images/)

List all downloaded/created images.

sh
docker images

Useful flags

  • -q Only show numeric IDs

[`docker inspect`](https://docs.docker.com/engine/reference/commandline/inspect)

Shows all the info of a container.

sh
docker inspect [CONTAINER ID]

[`docker logs`](https://docs.docker.com/engine/reference/commandline/logs/)

Gets logs from container.

sh
docker logs [CONTAINER ID]

Useful flags

  • --details Log extra details
  • --follow -f Follow log output. Do not stop when end of file is reached, but
    rather wait for additional data to be appended to the input.
  • --timestamps -t Show timestamps

[`docker ps`](https://docs.docker.com/engine/reference/commandline/ps/)

Shows information about all running containers.

sh
docker ps

Useful flags

  • --all -a Show all containers (default shows just running)
  • --filter -f Filter output based on conditions provided, docker ps -f="name="example"
  • --quiet -q Only display numeric IDs

[`docker rmi`](https://docs.docker.com/engine/reference/commandline/rmi/)

Remove one or more images.

sh
docker rmi [IMAGE ID]

Useful flags

  • --force -f Force removal of the image

[`docker run`](https://docs.docker.com/engine/reference/commandline/run/)

Creates and starts a container in one operation. Could be used to execute a
single command as well as start a long-running container.

Example:

sh
docker run -it ubuntu:latest /bin/bash

This will start a ubuntu container with the entrypoint /bin/bash. Note that
if you do not have the ubuntu image downloaded it will download it before
running it.

Useful flags

  • -it This will not make the container you started shut down immediately, as
    it will create a pseudo-TTY session (-t) and keep STDIN open (-i)
  • --rm Automatically remove the container when it exit. Otherwise it will be
    stored and visible running docker ps -a.
  • --detach -d Run container in background and print container ID
  • --volume -v Bind mount a volume. Useful for accessing folders on your local
    disk inside your docker container, like configuration files or storage that
    should be persisted (database, logs etc.).

Learn More

A list of more useful Docker commands can be found in the
docker-cheat-sheet.


Git Gitignore (`docs/git/gitignore.md`)


title: Git Ignore

Create the file ~/.gitignore as shown below

gitignore
# Folder view configuration files
.DS_Store
Desktop.ini

# Thumbnail cache files
._*
Thumbs.db

# Files that might appear on external disks
.Spotlight-V100
.Trashes

# Compiled Python files
*.pyc

# Compiled C++ files
*.out

# Application specific files
venv
node_modules
.sass-cache

followed by running the command below, in terminal:

sh
git config --global core.excludesfile ~/.gitignore

to not track files that are almost always ignored in all Git repositories.

Or simply download macOS specific .gitignore maintained by GitHub itself and put contents of it to ~/.gitignore.

  • You can also use a default gitignore using Curl
sh
curl https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore -o ~/.gitignore

Generate gitignore

Visit gitignore.io and fill it with your needs.


Homebrew Cask (`docs/homebrew/cask.md`)


title: Cask

Homebrew-Cask extends Homebrew and allows you to
install large binary files via a command-line tool. You can for example install
applications like Brave Browser, Slack, VLC and Rectangle. No more
downloading .dmg files and dragging them to your Applications folder!

To see if an app is available on Cask you can search on the official Cask
website
. You can also search in your terminal:

sh
brew search <package>

Example Applications

Quick Look plugins

These plugins add support for the corresponding file type to Mac Quick Look
(In Finder, mark a file and press Space to start Quick Look). The plugins
includes features like syntax highlighting, Markdown rendering, preview of
JSON, patch files, CSV, ZIP files and more.

sh
brew install --cask \
    qlmarkdown \
    betterzip \
    webpquicklook \
    suspicious-package \
    syntax-highlight

Browsers

sh
brew install --cask brave-browser

Terminals

sh
brew install --cask warp

Editors and IDEs

sh
brew install --cask \
    cursor \
    zed \
    sublime-text

AI Tools

sh
brew install --cask \
    claude \
    claude-code

Productivity

sh
brew install --cask \
    raycast \
    rectangle \
    caffeine \
    shottr \
    appcleaner

Developer Tools

sh
brew install --cask \
    docker \
    github \
    conductor

Communication and Media

sh
brew install --cask \
    slack \
    whatsapp \
    spotify

Other Useful Apps

sh
brew install --cask \
    1password \
    dropbox \
    transmission \
    vlc

Homebrew Usage (`docs/homebrew/usage.md`)


title: Usage

To install a package (or Formula in Homebrew vocabulary) simply type:

sh
brew install <formula>

To update Homebrew's directory of formulae, run:

sh
brew update

Note: If that command fails you can manually download the directory of
formulas like this:

sh
cd "$(brew --prefix)/Homebrew/"
git fetch origin
git reset --hard origin/main

To see if any of your formulas need to be updated:

sh
brew outdated

To update a formula:

sh
brew upgrade <formula>

Homebrew keeps older versions of formulas installed on your system, in case you
want to roll back to an older version. That is rarely necessary, so you can do
some cleanup to get rid of those old versions:

sh
brew cleanup

If you want to see what formulae Homebrew would delete without actually
deleting them
, you can run:

sh
brew cleanup --dry-run

To see what you have installed (with their version numbers):

sh
brew list --versions

To search for formulas you run:

sh
brew search <formula>

To get more information about a formula you run:

sh
brew info <formula>

To uninstall a formula you can run:

sh
brew uninstall <formula>

Here are some useful formulas for enhancing your command-line experience:

Core Utilities

macOS ships with outdated or BSD versions of many command-line tools. These formulas install the latest GNU versions:

sh
brew install \
    coreutils \
    moreutils \
    findutils \
    gnu-sed \
    grep \
    wget \
    bash \
    base64

Note: GNU tools are installed with a g prefix by default (e.g. gsed, gfind). To use them without the prefix, add their libexec/gnubin directories to your PATH. For example, Homebrew will display instructions after installing each formula.

Search Tools

sh
brew install the_silver_searcher

The Silver Searcher (ag) is a code searching tool similar to ack, but faster.


Iterm Ack (`docs/iterm/ack.md`)


title: ack

ack is a search tool designed for code. It's built to be a replacement for
grep with higher speed and more options.

Installation

To install the latest version, use homebrew.

sh
brew install ack

Why use `ack` over `grep`

  • Faster
  • Skips unimportant files by default
  • It searches recursively by default
  • Customizable

Usage

sh
ack [OPTION]... PATTERN [FILES OR DIRECTORIES]

Let's say you want to find all JavaScript files that are using the module
pancakes in your project, with ack it's as easy as

sh
ack --js pancakes

Or you may want to find all files that does not contain the word brew

sh
ack -L brew

Customization

You can customize ack to behave the way you want it to, this configuration i
s stored in /.ackrc.

For example, you can add a custom type to use as a flag when searching. The
following configuration will allow you to only search in .md, .mkd and
.markdown files using the --markdown flag.

sh
--type-set=markdown=.md,.mkd,.markdown

You can also tell ack to always sort and use colors in the result.

sh
--sort-files
--color

To see what configuration ack uses you can use the dump flag.

sh
ack --dump

Alternatives to `ack`

The Silver Searcher

The Silver Searcher (ag) is a code searching tool similar to ack, with a focus on speed.

sh
brew install the_silver_searcher

Usage is similar to ack:

sh
ag pancakes

Iterm Fzf (`docs/iterm/fzf.md`)


title: fzf

fzf is a general-purpose command-line
fuzzy finder. On it's own it's not very useful but when combined with other
tools it becomes super powerful.

Installation

Use Homebrew to
install fzf:

sh
brew install fzf

If you want to use shell extensions (better shell integration):

sh
$(brew --prefix)/opt/fzf/install

which gives you:

  • Key bindings (CTRL-T, CTRL-R, and ALT-C) (available for bash, zsh
    and fish)
  • Fuzzy auto-completion (available for bash and zsh)

Example Usages

Add any of these functions to your shell configuration file and apply the
changes to try them out. Or just paste the function in your terminal if you
just want to try it out without saving it.

sh
# fd - cd to selected directory
fd() {
  local dir
  dir=$(find ${1:-.} -path '*/\.*' -prune \
                  -o -type d -print 2> /dev/null | fzf +m) &&
  cd "$dir"
}
sh
# fh - search in your command history and execute selected command
fh() {
  eval $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//')
}

Chrome history from your terminal

Open up your shell config and add following function:

sh
# ch - browse chrome history
ch() {
  local cols sep
  cols=$(( COLUMNS / 3 ))
  sep='{::}'

  cp -f ~/Library/Application\ Support/Google/Chrome/Profile\ 1/History /tmp/h

  sqlite3 -separator $sep /tmp/h \
    "select substr(title, 1, $cols), url
     from urls order by last_visit_time desc" |
  awk -F $sep '{printf "%-'$cols's  \x1b[36m%s\x1b[m\n", $1, $2}' |
  fzf --ansi --multi | sed 's#.*\(https*://\)#\1#' | xargs open
}

Note: Ensure that path to History file is correct; read more information
on StackOverflow.


Iterm Tree (`docs/iterm/tree.md`)


title: tree

tree is a recursive directory listing command that produces a depth indented listing of files.

Installation

To install the latest version, use homebrew:

sh
brew install tree

Usage

Running tree will produce output like this:

console
$ tree

.
├── Apps
│   ├── Octave.md
│   ├── README.md
│   ├── Settings.md
│   ├── araxis-merge.jpg
│   ├── beyond-compare.png
│   ├── delta-walker.jpg
│   ├── filemerge.png
│   └── kaleidoscope.png
├── CONTRIBUTING.md
├── Cpp
│   └── README.md
├── Docker
│   └── README.md
├── Git
│   ├── README.md
│   └── gitignore.md
└── Go
    └── README.md

5 directories, 14 files

To limit the recursion you can pass an -L flag and specify the maximum depth tree will use when searching.

sh
tree -L 1

will output:

sh
.
├── Apps
├── CONTRIBUTING.md
├── Cpp
├── Docker
├── Git
└── Go

5 directories, 1 files

Iterm Zsh (`docs/iterm/zsh.md`)


title: Zsh

The Z shell (also known as zsh) is a Unix shell that is built on top of bash
and is the default shell for macOS (since Catalina). It's highly recommended
to install a framework with zsh as it makes dealing with configuration,
plugins and themes a lot nicer.

We've also included an env.sh file where we store our aliases, exports, path
changes etc. We put this in a separate file to not pollute our main
configuration file too much. This file is found in the bottom of this page.

Install zsh using Homebrew:

sh
brew install zsh

Now you should install a framework, we recommend to use Oh My Zsh
or Prezto. Note that you should
pick one of them, not use both.

The configuration file for zsh is called .zshrc and lives in your home
folder (~/.zshrc).

Oh My Zsh

Oh My Zsh is an open source,
community-driven framework for managing your zsh configuration. It comes
with a bunch of features out of the box and improves your terminal experience.

Install Oh My Zsh:

sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

The installation script should set zsh to your default shell, but if it
doesn't you can do it manually:

sh
chsh -s $(which zsh)

Configuration

The out-of-the-box configuration is usable but you probably want to customise
it to suit your needs. The Official Wiki
contains a lot of useful information if you want to deep dive into what you
can do with Oh My Zsh, but we'll cover the basics here.

To apply the changes you make you need to either start new shell instance
or run:

sh
source ~/.zshrc

Plugins

Add plugins to your shell by adding the name of the plugin to the plugin
array in your .zshrc.

sh
plugins=(git colored-man-pages colorize pip python brew macos)

You'll find a list of all plugins on the Oh My Zsh Wiki.
Note that adding plugins can cause your shell startup time to increase.

zsh-syntax-highlighting

The Syntax Highlighting plugin adds beautiful colors to the commands you are typing.

Clone the zsh-syntax-highlighting plugin’s repo and copy it to the “Oh My ZSH” plugins directory.

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

zsh-autosuggestions

This plugin auto suggests any of the previous commands. Pretty handy! To select the completion, simply press → key.

Clone the zsh-autosuggestions plugin’s repo and copy it to the “Oh My ZSH” plugins directory.

sh
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

Enforce Changes

To apply the changes you make you need to either start new shell instance
or run:

sh
source ~/.zshrc

Themes

Changing theme is as simple as changing a string in your configuration file.
The default theme is robbyrussell. Just change that value to change theme,
and don't forget to apply your changes.

sh
ZSH_THEME=pygmalion

You'll find a list of themes with screenshots on the
Oh My Zsh Wiki.

Prezto

Prezto is a configuration framework
for zsh; it enriches the command line interface environment with sane
defaults, aliases, functions, auto completion, and prompt themes.

Install Prezto:

sh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

Next create your ~/.zshrc by running:

sh
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
    ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
  done

For more information on customisation visit the GitHub repository for
Prezto
.

Modules

Add modules to Prezto by editing ~/.zpreztorc and adding the modules as
strings to the list:

sh
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'git' \
  'syntax-highlighting' \
  'history-substring-search' \
  'prompt'

And don't forget to apply your changes by starting a new shell instance.

Themes

To list all available themes run:

sh
prompt -l

Then open up your config file (~/.zpreztorc) and change to the theme you want:

sh
zstyle ':prezto:module:prompt' theme 'minimal'

`env.sh`

To include env.sh, open ~/.zshrc and add the following:

sh
source ~/<path to file>/env.sh

This file comes with some pre-defined settings, they are all optional.
Please review them before you use them as your configuration. These are just
examples to show you what you can customise in your shell.

sh
#!/bin/zsh

# Add commonly used folders to $PATH
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

# Specify default editor. Possible values: vim, nano, ed etc.
export EDITOR=vim

# File search functions
function f() { find . -iname "*$1*" ${@:2} }
function r() { grep "$1" ${@:2} -R . }

# Create a folder and move into it in one command
function mkcd() { mkdir -p "$@" && cd "$_"; }

# Example aliases
alias cppcompile='c++ -std=c++11 -stdlib=libc++'
alias g='git'

Java Sdkman (`docs/java/sdkman.md`)


title: SDKMAN!

SDKMAN! is a tool for managing parallel versions of multiple software development kits on most Unix-based systems. It provides a convenient command line interface (CLI) and API for installing, switching, removing and listing candidates.

Installation

Open a new terminal and enter:

sh
curl -s "https://get.sdkman.io" | bash

Follow the instructions on-screen to complete installation.
Next, open a new terminal or enter:

sh
source "$HOME/.sdkman/bin/sdkman-init.sh"

Lastly, run the following code snippet to ensure that installation succeeded:

sh
sdk version

If all went well, the version should be displayed. Something like:

sh
sdkman 5.0.0+51

Usage

Installing an SDK

Latest stable

Install the latest stable version of your SDK of choice (say, Java JDK) by running the following command:

sh
sdk install java

You will see something like the following output:

sh
Downloading: java 8u111

In progress...

######################################################################## 100.0%

Installing: java 8u111
Done installing!

Now you will be prompted if you want this version to be set as default.

sh
Do you want java 8u111 to be set as default? (Y/n):
Answering yes (or hitting enter) will ensure that all subsequent shells opened will have this version of the SDK in use by default.
Setting java 8u111 as default.

More commands

  • To install a specific version
    qualify the version you require:
sh
sdk install scala 2.12.1
  • To remove a version
sh
sdk uninstall scala 2.11.6

Note that removing a local version will not remove the local installation.

  • To list candidates
sh
sdk list

More useful commands and usages can be found at SDKMAN Usage.


Python Ipython (`docs/python/ipython.md`)


title: IPython

IPython is an improved Python shell than the one you get from running python in the command-line. It has many cool functions (running Unix commands from the Python shell, easy copy & paste, creating Matplotlib charts in-line etc.). You can find all functions in the documentation.
IPython is a kernel for Jupyter Notebook. If you are confused IPython with Jupyter, refer to the Jupyter documentation

Installation

sh
pip install ipython

If you want a more fine-grained command you can try the following:

For zsh ->

sh
pip install 'ipython[zmq,qtconsole,notebook,test]'

For bash ->

sh
pip install ipython[zmq,qtconsole,notebook,test]

Python Numpy (`docs/python/numpy.md`)


title: Numpy

The NumPy, SciPy and Matplotlib scientific libraries for Python are always a little tricky to install from source because they have all these dependencies they need to build correctly.

There are two ways to install these libraries:

  • Using pip

Python provides an inbuilt package management system pip which can be used to install these libraries

sh
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
sh
sudo port install py35-numpy py35-scipy py35-matplotlib py35-ipython +notebook py35-pandas py35-sympy py35-nose

Python Pip (`docs/python/pip.md`)


title: Pip

pip is the package manager for Python. If you installed Python via Homebrew or pyenv, pip is already included.

Verify Installation

sh
pip3 --version

If it returns a version pip was successfully installed.

Usage

Here are a few pip commands to get you started.

Install a Python package

sh
pip3 install <package>

Upgrade a package

sh
pip3 install --upgrade <package>

See what's installed

sh
pip3 freeze

Uninstall a package

sh
pip3 uninstall <package>

Python Virtualenv (`docs/python/virtualenv.md`)


title: Virtualenv

Virtualenv is a tool that lets you create an
isolated Python environment for your project. It creates an environment that
has its own installation directories, that doesn’t share dependencies with
other virtualenv environments (and optionally doesn’t access the globally
installed dependencies either). You can even configure what version of Python
you want to use for each individual environment. It's very much recommended to
use virtualenv when dealing with Python applications.

Installation

To install virtualenv run:

sh
pip install virtualenv

Usage

If you have a project in a directory called my-project you can set up
virtualenv for that project by running:

sh
cd my-project/
virtualenv venv

If you want your virtualenv to also inherit globally installed packages run:

sh
virtualenv venv --system-site-packages

These commands create a venv/ directory in your project where all
dependencies are installed. You need to activate it first though (in every
terminal instance where you are working on your project):

sh
source venv/bin/activate

You should see a (venv) appear at the beginning of your terminal prompt
indicating that you are working inside the virtualenv. Now when you install
something like this:

sh
pip install <package>

It will get installed in the venv/ folder, and not conflict with other
projects.

To leave the virtual environment run:

sh
deactivate

Important: Remember to add venv to your project's .gitignore file so
you don't include all of that in your source code.

It is preferable to install big packages (like Numpy), or packages you always
use (like IPython) globally. All the rest can be installed in a virtualenv.

Virtualenvwrapper

To make it easier to work on multiple projects that has separate environments
you can install virtualenvwrapper. It's an extension to virtualenv and
makes it easier to create and delete virtual environments without creating
dependency conflicts.

To install virtualenvwrapper run:

sh
pip install virtualenvwrapper

Depending on your setup you might need to install it using sudo. Read the
installation
documentation

for more information.

Note: virtualenvwrapper keeps all the virtual environments in
~/.virtualenv while virtualenv keeps them in the project directory.


Ruby Rubygems (`docs/ruby/rubygems.md`)


title: RubyGems

RubyGems, the Ruby package manager, should be installed on your machine if you previously have installed Ruby. Verify this by running:

sh
which gem

Update RubyGems

To update to its latest version with:

sh
gem update --system

Install gems

To install a gem (Ruby package), run:

sh
gem install <gemname>

To install without generating the documentation for each gem (faster):

sh
gem install <gemname> --no-document

List installed gems

sh
gem list

To check if any installed gems are outdated:

sh
gem outdated

Update installed gems

To update all gems or a particular gem:

sh
gem update [<gemname>]

Remove old gem versions

RubyGems keeps old versions of gems, so feel free to do some cleaning after updating:

sh
gem cleanup

Sublime Text Packages (`docs/sublime-text/packages.md`)


title: Packages

Install Package Control

The simplest method of installation is through the Sublime Text console. The console is accessed via View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.

This snippet changes each version and older versions will return an error.

To get the current versions code, go to packagecontrol.io


Sublime Text Plugins (`docs/sublime-text/plugins.md`)


title: Plugins

  • Alignment: Easy alignment of multiple selections and multi-line selections
  • All Autocomplete: Extend Sublime Text 2 auto-completion to find matches in all open files of the current window
  • AutoFileName: Plugin that auto-completes filenames
  • Bootstrap 3 Snippets: Twitter Bootstrap 3 snippets plugin for Sublime Text 2 and 3
  • BracketHighlighter: Bracket and tag highlighter
  • Dictionaries: Hunspell UTF8 dictionaries
  • DictionaryAutoComplete: Plugin that adds dictionary entries to the completions inside comments
  • EncodingHelper: Guess encoding of files, show in status bar, convert to UTF-8 from a variety of encodings
  • FileDiffs: Shows diffs between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes
  • Git: Plugin for some Git integration
  • GitGutter: A Sublime Text 2 and 3 plugin to see git diff in gutter
  • IndentXML: Plugin for re-indenting XML and JSON files
  • Jade: A comprehensive bundle for the Jade template language
  • Jedi - Python autocompletion: Jedi is an autocompletion tool for Python
  • Jekyll: A plugin for Jekyll static sites
  • LaTeXTools: A LaTeX Plugin for Sublime Text 2 and 3
  • Python Auto-Complete: Sublime Text 2 plugin which adds additional auto-completion capability to Python scripts
  • Python Imports Sorter: Sublime Text 2 plugin to organize your imports easily
  • PythonTraceback: Easy navigation in your python tracebacks
  • SideBarEnhancements: Enhancements to sidebar. Files and folders.
  • SublimeCodeIntel: Full-featured code intelligence and smart auto-complete engine
  • SublimeLinter: Interactive code linting framework for Sublime Text 3
  • SublimeLinter-pep8: Linter plugin for python using PEP8
  • TrailingSpaces: Highlight trailing spaces and delete them in a flash

Sublime Text Preferences (`docs/sublime-text/preferences.md`)


title: Preferences

This is an example of User Settings for a basic development but please feel free to modify or update as per your choice.

json
{
    "auto_complete_delay": 5,
    "auto_complete_selector": "source, text",
    "color_scheme": "Packages/User/Monokai (SL).tmTheme",
    "create_window_at_startup": false,
    "folder_exclude_patterns":
    [
        ".svn",
        ".git",
        ".DS_Store",
        "__pycache__",
        "*.pyc",
        "*.pyo",
        "*.exe",
        "*.dll",
        "*.obj",
        "*.o",
        "*.a",
        "*.lib",
        "*.so",
        "*.dylib",
        "*.ncb",
        "*.sdf",
        "*.suo",
        "*.pdb",
        "*.idb",
        "*.psd"
    ],
    "font_face": "Source Code Pro",
    "font_size": 13,
    "ignored_packages":
    [
        "Markdown",
        "Vintage"
    ],
    "open_files_in_new_window": false,
    "rulers":
    [
        80
    ],
    "translate_tabs_to_spaces": true,
    "word_wrap": true
}

Sublime Text Sublime Linter (`docs/sublime-text/sublime-linter.md`)


title: Sublime Linter

json
{
    "user": {
        "debug": false,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "none",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "linters": {
            "pep8": {
                "@disable": false,
                "args": [],
                "disable": "",
                "enable": "",
                "excludes": [],
                "ignore": "",
                "max-line-length": null,
                "rcfile": "",
                "select": ""
            }
        },
        "mark_style": "outline",
        "no_column_highlights_line": false,
        "paths": {
            "linux": [],
            "osx": [
                "/usr/local/bin/"
            ],
            "windows": []
        },
        "python_paths": {
            "linux": [],
            "osx": [
                "/usr/local/bin/"
            ],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "php": "html",
            "python django": "python"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

--- METRICS ---