Skip to content

Instantly share code, notes, and snippets.

@jorandradefig
Last active November 14, 2024 16:12
Show Gist options
  • Save jorandradefig/76f77e5c3010183eb50ca3bb7c70143c to your computer and use it in GitHub Desktop.
Save jorandradefig/76f77e5c3010183eb50ca3bb7c70143c to your computer and use it in GitHub Desktop.
macOS Setup Guide
Firefox Developer Edition
Google Chrome
Xcode
Fabric
Android Studio
Genymotion
Expo
Visual Studio Code
Evernote
Telegram Desktop
WhatsApp
Battle.net
Google Drive File Stream
TeamViewer
VirtualBox
Dropbox
Google Drive
Docker
Vagrant
Spectacle
Signal
Skype
Fantastical
Postman
FileZilla
Cyberduck
Newton
SourceTree
Dash
Robomongo
Arduino
Stickies
Zeplin
Sketch
CheatSheet https://www.mediaatelier.com/CheatSheet/
Focus To-Do
Ostinato
RStudio
PSequel
Endurance
KeePassXC
Tunnelblick
VMware Fusion
GNS3
Wireshark
MAMP
XAMPP
ZOOM
Slack
Replit
CodePen
Firebase
GitBook
GitHub
GitLab
Bitbucket
Trello
Asana
Slack
Pastebin

Download Xcode in the App Store

Install Xcode command line tools

xcode-select --install

Setting development environment

Configure Git

git config --global user.name "Jorge Andrade"
git config --global user.email [email protected]
git config --global color.ui true
git config --global core.editor "vim"

Git set remote URLs

git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

Git Submodules

git clone --recursive https://[email protected]/databox/databox-suite.git
git submodule add [email protected]:databox/hq.git
git submodule update --remote

Download Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Download zsh

brew install zsh zsh-completions

Download Oh My Zsh

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
chsh -s /usr/local/bin/zsh
--------
sudo sh -c "echo $(which zsh) >> /etc/shells"
chsh -s $(which zsh)

Edit the .zshrc file

ZSH_THEME="agnoster"

Download Powerline Fonts

git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh

Add Dracula Theme to terminal

Terminal > Settings Tab
Click "Gear" icon
Click Import...
Select the Dracula.terminal file
Click Default

Configurate Terminal window size and font

250 x 60
Roboto Mono for Powerline 12pt

Configure Vim

curl -o ~/.vimrc https://www.dropbox.com/s/o6og56bcgzm5jpi/.vimrc\?dl\=0

brew install vim
exec -l $SHELL
brew install cmake
brew install ctags
brew install editorconfig
brew install wget
brew install vifm

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Launch vim and run :PluginInstall

cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer

Download Node

brew update
brew install node
npm install -g n
sudo n lts
sudo npm install -g npm

Configure npm

npm config set init.author.name "Jorge Andrade"
npm config set init.author.email [email protected]
npm config set init.author.url jorandradefig.github.io
npm config set init.license MIT

Angular

npm install -g @angular/cli

ng new my-new-project --style=<scss|sass|less|stylus> --routing --skip-install
ng set --global packageManager=yarn

ng g component my-new-component
ng g directive my-new-directive
ng g pipe my-new-pipe
ng g service my-new-service
ng g module my-new-module

ng serve
ng serve -H 0.0.0.0

ng build
ng build --prod
ng build --prod --aot

Angular Setup

npm install [email protected] --save
npm install font-awesome --save
npm install jquery --save
npm install @types/jquery --save-dev
npm install --save lodash
npm install --save-dev @types/lodash

package.json

"start": "ng serve -H 0.0.0.0"

.angular-cli.json

"styles": [
  "styles.styl",
  "../node_modules/bootstrap/dist/css/bootstrap.css",
  "../node_modules/font-awesome/css/font-awesome.css"
],
"scripts": [
  "../node_modules/jquery/dist/jquery.js"
]

angular-cli with pug

npm install --save-dev gulp gulp-pug

gulpfile.js

let path = require('path');
let gulp = require('gulp');
let pug  = require('gulp-pug');

let pugFiles = './src/**/*.pug';

gulp.task('pug', () => {
  gulp.src( pugFiles )
    .pipe( pug().on('error', () => console.log('JADE ERROR')) )
    .pipe( gulp.dest('./src') );
});

gulp.task('default', ['pug'], () => {
  gulp.watch(pugFiles, ['pug']);
});

.gitignore

# HTML files
/src/**/*.html
!src/index.html

Change app.component.html to app.component.pug

gulp pug

Download Yarn

brew install yarn

Download Visual Studio Code

Setup Visual Studio Code

Download Dracula Theme for vscode

node cli

npm install -g yarn
npm install -g @vue/cli
npm install -g bower
npm install -g sails
npm install -g yo gulp-cli
npm install -g http-server

npm install -g typescript
npm install -g ngrok
npm install -g svg-term-cli

Bash

brew install jq
brew install htop
brew install ctop
npm install -g vtop
brew install parallel
brew install figlet
brew install git-lfs
brew install tmux
npm install -g ngrok
brew install asciinema
brew install exa
brew install ffmpeg
brew install pngquant
brew install optipng
brew install bfg

Vagrant

brew cask install vagrant
brew cask install virtualbox
vagrant init ubuntu/trusty64
vagrant up --provider virtualbox

Alias for cd ..

..
....

zsh plugins

https://github.com/wting/autojump
https://github.com/junegunn/fzf
https://github.com/sharkdp/bat
https://github.com/sharkdp/fd
https://github.com/BurntSushi/ripgrep
https://github.com/zsh-users/zsh-autosuggestions
https://github.com/chrissicool/zsh-256color
https://github.com/zsh-users/zsh-history-substring-search
https://github.com/zsh-users/zsh-completions
https://github.com/zsh-users/zsh-syntax-highlighting

brew install autojump
brew install fzf
$(brew --prefix)/opt/fzf/install
brew install bat
brew install fd
brew install ripgrep
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
( cd $ZSH_CUSTOM/plugins && git clone https://github.com/chrissicool/zsh-256color )
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

zsh shortcuts

bindkey
<CTRL>+R
ls -<TAB>

Gzip

gzip filename.csv
gzip -d filename.csv.gz

MongoDB

brew install mongodb
sudo mkdir -p /data/db
sudo chmod 0755 /data/db
sudo mongod

PostgreSQL

brew install postgresql
initdb /usr/local/var/postgres
postgres -d 1 -D /usr/local/var/postgres
/usr/local/opt/postgres/bin/createuser -s postgres
psql postgres

pg_ctl -D /usr/local/var/postgres/data -l logfile start
pg_ctl -D /usr/local/var/postgres/data -l logfile stop

psql

CREATE ROLE username WITH LOGIN PASSWORD 'username';
ALTER USER username CREATEDB;
CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON DATABASE databasename TO username;
ALTER USER username WITH SUPERUSER;
\connect databasename

Python 3

brew install python3
pip3 install pylint
pip3 install awscli

Jupyter

pip3 install --upgrade pip
pip3 install jupyter
pip3 install numpy scipy matplotlib pandas xlrd sympy nose scikit-learn theano tensorflow scrapy nltk seaborn bokeh networkx
jupyter notebook
jupyter nbconvert --to html mynotebook.ipynb

R

brew cask install xquartz
brew tap homebrew/science
brew install --with-x11 r

Redis

brew install redis
redis-server /usr/local/etc/redis.conf
redis-cli ping

Docker

https://www.docker.com/docker-mac

brew cask install docker

docker images
docker ps -a
docker logs <container id>
docker exec -it <container id> /bin/bash
curl -i localhost:49160

docker stop <container id>

docker rm <container id>
docker rmi <image id>

docker stop $(docker ps -a -q)

docker rm $(docker ps -a -q)
docker rmi $(docker images -q)

Docker without volume

docker build -t <image name:tag> .
docker run --name <container name> -p 49160:4200 -d <image name:tag>

Docker with volume

docker build -t <image name:tag> .
docker run --name <container name> -v $(pwd):/usr/src/app -p 49160:4200 -d <image name:tag> /bin/bash -c "npm install && npm start"
docker exec -it <container id> /bin/bash -c "npm install && npm start"

Dockerfile

Angular without volume

FROM node:boron

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json /usr/src/app
RUN npm install

# Bundle app source
COPY . /usr/src/app

EXPOSE 4200
CMD [ "npm", "start" ]

Angular with volume

FROM node:boron

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

lighthouse

npm install -g lighthouse

lighthouse https://airhorner.com/

iOS

CocoaPods

sudo gem install cocoapods
@therealandreww
Copy link

I prefer using oh-my-fish with the fish-shell. Most people don't know this, please try the fish shell: fishshell.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment