Skip to content

Commit 4d7830a

Browse files
committed
Modernize the dev guide - add zsh config
1 parent 97b7c7a commit 4d7830a

15 files changed

+302
-208
lines changed

11-big-sur/install-macos-big-sur.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
### Install macOS Big Sur
2525

26-
> Before you proceed with installing macOS please make sure you have backed up your previous settings, keys and data. If you need help to organize your thoughts, refer to our [backup guide](/backup/backup-guide.md).
26+
> Before you proceed with installing macOS please make sure you have backed up your previous settings, keys and data. If you need help to organize your thoughts, refer to our [backup guide](/backup.md).
2727
2828
1. Plug the USB disk to your machine;
2929
2. Go to `System Settings > Startup Disk`;

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2016 Dimitrios C. Michalakos
3+
Copyright (c) 2015-2021 Dimitrios C. Michalakos
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
# MacOS-Dev-Setup
22

3-
Best practices to setup and configure macOS for developers.
3+
An opinionated guide to setup and configure macOS for developers.
44

55
### Table of Contents
66

7+
##### Backup
8+
9+
If you are coming from an existing macOS installation, make sure you have backed up your data and settings before proceeding with any changes.
10+
11+
- [Backup Guide](backup.md)
12+
713
##### Operating System
814

9-
At the time of writing the latest macOS version is Big Sur (11.1).
15+
At the time of writing the latest macOS release is Big Sur (11.1).
1016

1117
1. [Install macOS Big Sur](/11-big-sur/install-macos-big-sur.md)
1218
2. [Secure macOS Big Sur](/11-big-sur/secure-macos-big-sur.md)
1319

14-
If you are looking for an older macOS version please consider the following:
20+
If you are looking for an older macOS version please consider the following guides:
1521

1622
<details>
1723
<summary>Sierra (10.12)</summary>
@@ -30,26 +36,30 @@ If you are looking for an older macOS version please consider the following:
3036

3137
##### General
3238

33-
- [Setup the Terminal](setup-terminal.md)
34-
- [Install Homebrew](install-homebrew.md)
39+
- [Homebrew](homebrew.md)
40+
- [Keyboard Configuration](keyboard-config.md)
3541

3642
##### Privacy
3743

38-
- [Setup PGP](setup-pgp.md)
44+
- [PGP](pgp.md)
3945

4046
##### Version Control
4147

42-
- [Install Git](install-git.md)
48+
- [Git](git.md)
49+
50+
##### Shell
51+
52+
- [zsh](zsh.md)
4353

4454
##### Programming Languages & Platforms
4555

46-
- [Install Node.js & npm](install-node-npm.md)
56+
- [Node.js & npm](node-npm.md)
4757

4858
##### Databases
4959

50-
- [Install MySQL](install-mysql-5.6.md)
51-
- [Install PostgreSQL](install-postgres.md)
60+
- [MySQL 5.6](mysql-5.6.md)
61+
- [PostgreSQL](postgres.md)
5262

5363
##### IDEs & Editors
5464

55-
- [Install Sublime Text 3](install-sublime-3.md)
65+
- [Sublime Text 3](sublime-3.md)
File renamed without changes.

git.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Git
2+
3+
Git is one of the most popular version control systems. It comes pre-installed on macOS. However, Apple's bundled version of Git is not as well-maintained as the official Git repo.
4+
5+
### Installation
6+
7+
1. Make sure you have installed Homebrew on your system - if not, read the [Homebrew](homebrew.md) guide;
8+
9+
```bash
10+
which brew
11+
```
12+
13+
2. Open terminal and run the following command:
14+
15+
```bash
16+
brew install git
17+
```
18+
19+
3. Verify git has been installed.
20+
21+
```bash
22+
git --version
23+
```
24+
25+
#### Configuration
26+
27+
1. Set Git editor;
28+
29+
```bash
30+
git config --global core.editor "nano"
31+
```
32+
33+
2. Set Git default push behaviour;
34+
35+
```bash
36+
git config --global push.default simple
37+
```
38+
39+
3. Set Git user;
40+
41+
```bash
42+
git config --global user.name "Your Name"
43+
git config --global user.email [email protected]
44+
```
45+
46+
#### Git completion in bash
47+
48+
> Ignore this section if you are NOT a bash user.
49+
50+
1. Create configuration files;
51+
52+
```bash
53+
touch ~/.bash_profile
54+
touch ~/.git-completion.bash
55+
touch ~/.git-prompt.sh
56+
```
57+
58+
2. Populate `.git-completion.bash` with [https://github.com/git/git/blob/master/contrib/completion/git-completion.bash](https://github.com/git/git/blob/master/contrib/completion/git-completion.bash);
59+
3. Populate `.git-prompt.sh` with [https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh](https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh);
60+
4. Update permissions of `.git-completion.bash` and `.git-prompt.sh`;
61+
62+
```bash
63+
chmod 755 ~/.git-completion.bash
64+
chmod 755 ~/.git-prompt.sh
65+
```
66+
67+
5. Populate `.bash_profile`, as follows:
68+
69+
```bash
70+
#!/bin/bash
71+
72+
export PATH="/usr/local/bin:$PATH"
73+
74+
source ~/.git-completion.bash
75+
source ~/.git-prompt.sh
76+
77+
MAGENTA="\[\033[0;35m\]"
78+
YELLOW="\[\033[0;33m\]"
79+
BLUE="\[\033[34m\]"
80+
LIGHT_GRAY="\[\033[0;37m\]"
81+
CYAN="\[\033[0;36m\]"
82+
GREEN="\[\033[0;32m\]"
83+
GIT_PS1_SHOWDIRTYSTATE=true
84+
export LS_OPTIONS='--color=auto'
85+
export CLICOLOR='Yes'
86+
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD
87+
88+
export PS1=$LIGHT_GRAY"\u@\h"'$(
89+
if [[ $(__git_ps1) =~ \*\)$ ]]
90+
# a file has been modified but not added
91+
then echo "'$YELLOW'"$(__git_ps1 " (%s)")
92+
elif [[ $(__git_ps1) =~ \+\)$ ]]
93+
# a file has been added, but not commited
94+
then echo "'$MAGENTA'"$(__git_ps1 " (%s)")
95+
# the state is clean, changes are commited
96+
else echo "'$CYAN'"$(__git_ps1 " (%s)")
97+
fi)'$BLUE" \w"$GREEN": "
98+
99+
alias ll='ls -lah'
100+
alias gg='git status -s'
101+
```
102+
103+
Please note: You need to restart your terminal for the settings to take effect.

install-homebrew.md renamed to homebrew.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Install Homebrew
1+
# Homebrew
22

3-
Homebrew is an excellent open-source solution to install software packages on your Mac.
3+
Homebrew is an excellent open-source package manager for Mac.
44

5-
### Quick setup
5+
### Installation
66

77
```bash
88
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

install-git.md

Lines changed: 0 additions & 101 deletions
This file was deleted.

keyboard-config.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Configure Keyboard
2+
3+
### Edit keyboard type speed
4+
5+
1. Go to `System Settings > Keyboard > Keyboard`;
6+
2. Drag the _Key Repeat_ slider to the right-most _Fast_;
7+
3. Drag the _Delay Until Repeat_ slider to the right-most _Short_.

install-mysql-5.6.md renamed to mysql-5.6.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Install MySQL
1+
# MySQL 5.6
22

3-
### Install MySQL Server
3+
### MySQL Server installation
44

55
1. Visit [http://dev.mysql.com/downloads/mysql/](http://dev.mysql.com/downloads/mysql/);
66
2. Download the latest .dmg archive;
77
3. Open the downloaded file and follow on-screen instructions;
88
4. You will receive a prompt window with the MySQL server password - store it in a temporary location;
9-
5. Append the following to your .bash_profile;
9+
5. Append the following to your `~/.bash_profile` or `~/.zshrc`;
1010

11-
```
12-
export PATH=${PATH}:/usr/local/mysql/bin
13-
```
11+
```
12+
export PATH=${PATH}:/usr/local/mysql/bin
13+
```
1414

15-
##### Setup MySQL Preference Pane
15+
##### MySQL Preference Pane
1616

1717
The _MySQL preference pane_ enables you to start, stop, and control MySQL server within _System Preferences_.
1818

@@ -31,22 +31,22 @@ Please note: This is an important step in order to be able to connect with MySQL
3131
2. Make sure the MySQL server is running. If not, start the server;
3232
3. Run the following command in a terminal;
3333

34-
```bash
35-
mysql --user root --password
36-
```
34+
```bash
35+
mysql --user root --password
36+
```
3737

38-
Enter the server password you were given during MySQL server installation.
38+
Enter the server password you were given during MySQL server installation.
3939

4040
4. Execute the following SQL command;
4141

42-
```sql
43-
SET PASSWORD = PASSWORD('<new password/>');
44-
```
42+
```sql
43+
SET PASSWORD = PASSWORD('<new password/>');
44+
```
4545

4646
5. Enter `quit` to exit the MySQL CLI session;
4747
6. Store password in a secure location, e.g. [KeePassX](https://www.keepassx.org/).
4848

49-
### Install MySQL Workbench
49+
### MySQL Workbench installation
5050

5151
MySQL Workbench is the official MySQL client. It's free, as in beer, and quite powerful.
5252

install-node-npm.md renamed to node-npm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Install Node.js & npm
1+
# Node.js
22

3-
### Install Node.js & npm
3+
### Installation
44

55
1. Visit [https://nodejs.org/en/download/current](https://nodejs.org/en/download/current);
66
2. Download the latest Node.js dmg archive, which comes bundled with the npm client. If you don't know which file to download look for the "macOS Installer";
@@ -42,7 +42,7 @@ If you are planning to publishing modules to the npm registry you should login w
4242

4343
### Working with private modules
4444

45-
1. Append the following to your .bash_profile;
45+
1. Append the following to your `~/.bash_profile` or `~/.zshrc`;
4646

4747
```bash
4848
export NPM_TOKEN=$(cat ~/.npmrc | awk -F'authToken=' '{print $2}')

0 commit comments

Comments
 (0)