Coder Social home page Coder Social logo

dotfiles's Introduction

Mac OS X setup

This is a list of reproducible steps to get a clean Mac (with Apple Silicon) up and running with nice dotfiles for Fish, plus a whole bunch of apps and development tools.

Fish theme

Step 1: ssh keys

Restore your saved ssh keys or create a new pair.

Step 2: install Homebrew and git

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

Step 3: dotfiles

Clone this repository

$ git clone [email protected]:kevinrenskers/dotfiles.git

And run the bootstrap.sh script. Alternatively, only run the setup.sh scripts in specific subfolders if you don't need everything.

Restart your shell after it's done.

You can now run fish_config to change the terminal colors, abbreviations, etc.

Don't forget to set your git credentials, or you'll be using my details which are in the dotfiles:

$ git config --global user.name "Kevin Renskers"
$ git config --global user.email "[email protected]"

Step 4: anything else you need

Python

I'm using Poetry as the package manager and environment manager for Python projects, together with pyenv to install specific versions of Python. I do not use Homebrew to install Python, nor do I use the system version of Python.

Start by installing pyenv:

$ brew install pyenv

Then install a Python version, for example 3.10:

$ pyenv install 3.10
$ pyenv global 3.10

Make sure it works:

$ which python3
$ python3 --version

They should point to the version installed in the .pyenv folder and of course match the version you specified. Now we can install Poetry:

$ curl -sSL https://install.python-poetry.org | python3 -

And to make sure it works:

$ poetry --version

Some useful settings to enable:

$ poetry config virtualenvs.in-project true
$ poetry config virtualenvs.prefer-active-python true

These settings will make working with local Python versions via pyenv a lot easier, and make it a lot easier to nuke the .venv folder within a project to reinstall your dependencies.

git up

I love git up, which updates all local branches with remote changes, by rebasing rather than merging. You just run git up in your project and everything is up to date.

After installing Python, you can simply install git up with one command:

$ pip install git-up

Ruby

I'm using rbenv instead of the system Ruby, to prevent annoying permission problems. You should never have to use sudo to install gems!

brew install rbenv
rbenv init

Follow the printed instructions to set up rbenv shell integration. Close your terminal and open a new one so the changes take effect. Then verify that everything is okay:

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

Now you can install (and then use) a Ruby version, for example:

rbenv install 2.6.4
rbenv global 2.6.4

PostgreSQL

Simply download Postgress.app from http://postgresapp.com.

Node.js and NPM (Node Package Manager)

I'm using pnpm as my Node package manager, and to install specific Node versions.

$ curl -fsSL https://get.pnpm.io/install.sh | sh -
$ pnpm env use --global lts

Restart your shell and check if everything works: node --version.

To update pnpm itself:

$ pnpm add -g pnpm

Nginx

$ brew install nginx
$ sudo ln -sfv /usr/local/opt/nginx/*.plist /Library/LaunchAgents
$ sudo mkdir /var/log/nginx/

Edit /usr/local/etc/nginx/nginx.conf, change port to 80 and error_log to /var/log/nginx/error.log. Then start the server:

$ sudo nginx

Config file:

/usr/local/etc/nginx/nginx.conf

Other commands:

$ sudo nginx -s stop
$ sudo nginx -s reload

Thanks to...

dotfiles's People

Contributors

kevinrenskers avatar

Stargazers

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

Watchers

 avatar  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.