Coder Social home page Coder Social logo

kinoute / macos-setup Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 7.0 629 KB

A few scripts to setup a new macOS machine for development.

License: MIT License

Shell 97.93% Vim Script 2.07%
mac macos scripts bash iterm2 sublime-text dotfiles brew dev-setup macos-setup

macos-setup's Introduction

macOS setup for Development

Sometimes, I have to reinstall everything I need on brand new Macs or Hackintoshes. After getting tired of doing it โ€“ especially tweaking macOS manually, I decided to regroup everything here.

Don't run everything blindlessly. I reunited these scripts for my own use, a lot of commands or packages may not suit you. Please fork the project or review the files to comment things you don't want.

Full Installation

If you want to install everything, just do:

git clone [email protected]:kinoute/macos-setup.git
cd macos-setup
bash install.sh

If you can't run the script, you might have to change its attributes. Just do:

chmod +x install.sh

When started, you will be asked for your password just once in order to install/edit several things on macOS.

This script basically calls a few sub-scripts that do their own business listed below.

Manual Installation

If there are some packages or applications you don't want to install, you have two choices:

  • Either you edit the installation files and remove the things you don't want ;
  • Either you run manually the only installation sub-scripts you're interested in.

Here are all the sub-scripts that are called when running the full installation:

brew.sh

This script first checks if you have homebrew installed on your machine. If not, it downloads and installs it. Then it installs a lot of binaries through homebrew.

To only run this script, do:

# important to run the script from the project's directory
bash scripts/brew.sh 
# you might need to do chmod +x brew.sh before to run this script

The comments inside the file speak for themselves but to sum up, this script installs:

  • A few languages (python, php, zsh, go, node) ;
  • Updated tools (vim, grep, openssh, screen) ;
  • GNU tools (sed, find, locate, xargs...) ;
  • Useful binaries (git, imagemagick, pv, rename, tree, jq, ffmpeg, ripgrep, wget, htop, watch...) ;
  • Some macOS dev-related apps (iTerm2, Sublime Text, VirtualBox, Brave, Miniconda, VSCode..) ;
  • Some random macOS apps (flux, Spotify, VLC, Lulu, Onyx, Transmission, Slack..) ;
  • Some Safari extensions (Adguard, Nightlight) ;
  • Docker and lazydocker to manage easily our containers/images ;
  • The Roboto-Mono font and its powerline version for iTerm 2 / Zsh ;
  • macOS Quicklook plugins (markdown, video, csv, zip, Jupyter notebooks, json..) ;
  • Tools to fix codes automatically (php-cs-fixer, rubocop, autopep8..) ;
  • Optional: Hackintoshes stuff if needed (Karabiner Elements to modify keys).

conda.sh

This script only copies some useful Deep Learning environments to ~/.conda. You can create an environment based one of these files with conda create.

git.sh

This script checks if you have already set up a .gitconfigfile. If not, it asks for your git username and email and copies a .gitignore file containing famous and useful files/folders to ignore on your projects.

macos.sh

This script changes a lot of macOS settings for better performance and productivity. You can review all the modifications within the file by reading the comments of each line.

ssh.sh

This script first checks if you already have a SSH key generated. If not, it will generate one for you asking for some additional informations like your email or a passphrase. It will automatically add the new SSH Key to your macOS Keychain and available to use immmediately on your system (and on your clipboard).

terminal.sh

This script sets Zsh as your default shell if you installed it through the script brew.sh). It will install the Oh-My-Zsh framework as well and useful plugins like syntax highlighting, auto-suggestions, and nice terminal font.

Also, It will install useful VIM plugins, load some nice iTerm2 preferences and copy a few configuration files for screen, wget or conda.

Credits

Made by Yann Defretin. Heavily inspired by:

macos-setup's People

Contributors

kinoute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.