Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alexfuser/d7c364f986bbcbea4cd728453bc04fef to your computer and use it in GitHub Desktop.
Save alexfuser/d7c364f986bbcbea4cd728453bc04fef to your computer and use it in GitHub Desktop.
macOS Setup Guide
Google Chrome
Xcode
Visual Studio Code
Evernote
Dropbox
Google Drive
Docker
Spectacle
Fantastical
Postman
FileZilla
Cyberduck
Newton
SourceTree
Dash
Robomongo
Stickies
CheatSheet https://www.mediaatelier.com/CheatSheet/

Download Google Chrome
https://www.google.com/chrome/

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 jorandradefig@gmail.com
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://jorandradefig@gitlab.com/databox/databox-suite.git
git submodule add git@gitlab.com: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

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 ctags
brew install editorconfig
brew install wget

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

Download Node

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

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 bootstrap@4.0.0-alpha.6 --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 bower
npm install -g sails
npm install -g yo gulp-cli
npm install -g http-server

npm install -g typescript
npm install ngrok -g

Bash

brew install jq
brew install htop
brew install ctop
brew install parallel
brew install figlet
brew install git-lfs

Vagrant

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

Alias for cd ..

..
....

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
postgres -D /usr/local/var/postgres
initdb `brew --prefix`/var/postgres/data -E utf8
pg_ctl -D /usr/local/var/postgres/data start
psql postgres

psql

CREATE ROLE username WITH LOGIN PASSWORD 'username';
CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON DATABASE databasename TO username;
\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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment