Coder Social home page Coder Social logo

dotfiles's Introduction

Bootstrap

Dependencies

  • git
  • curl
  • make

Dotfiles

Running make

git clone https://github.com/creack/dotfiles ~/.dotfiles
cd ~/.dotfiles
make -j

Note that the Makefile manages:

  • go
  • oh-my-zsh
  • nvm

Configurations

Import ssh/gpg keys

github_user=creack
curl https://github.com/${github_user}.gpg | gpg --import
curl https://github.com/${github_user}.keys >> ~/.ssh/authorized_keys

Linux Specific

Set default shell

chsh -s /usr/bin/zsh $(whoami)

Setup sudo

As root:

apt-get update && apt-get install -y sudo
user=creack
echo "$user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/90-primary-user

Install Docker

# Docker itself.
curl -fsSL https://get.docker.com | sh
sudo groupadd docker
sudo usermod -aG docker $(whoami)

OSX Specific

Whitelist Brew's zsh / set default shell

sudo sh -c 'echo /usr/local/bin/zsh >> /etc/shells'
chsh -s /usr/local/bin/zsh $(whoami)

Install Homebrew

Note that Apple announced they will remove ruby from OSX by default. Will need to update how to install brew.

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

Install Docker

brew cask install virtualbox
brew install docker docker-machine docker-compose
docker-machine create --driver=virtualbox --virtualbox-disk-size=200000 --virtualbox-cpu-count=4 default
eval "$(docker-machine env)"
docker ps

Set proper hostname

  1. System Preferences -> Sharing -> Computer's Name

Update keyboard settings

  1. System Preferences -> Keyboard -> Key Repeat -> Set to Fast
  2. System Preferences -> Keyboard -> Delay Until Repeat -> Set to Short

Update trackpad settings

  1. System Preferences -> Trackpad -> Tap to click -> Enable
  2. System Preferences -> Trackpad -> Tracking speed -> Set to Fast

Set proper screen resolution

  1. System Preferences -> Displays -> Resolution: Scaled -> More Space

Install Packages

Make sure to have all of this installed. Some might be installed by default.

Dependencies:

  • git
  • curl
  • make

Common tools:

  • tmux
  • emacs (emacs-nox on linux)
  • gpg
  • ssh
  • python / pip
    • powerline-status
    • awscli
  • most
  • zsh (on OSX, install it from brew to have newer version)
  • remake
  • ntpdate

Usage

Update Go

# Go itself.
(cd ~/.dotfiles && echo "1.13.1" > versions/go && make)
go version

# Go tools (golint, govet, guru, etc).
go get golang.org/x/tools/cmd/...

# Linter
(cd ~/.dotfiles && echo "1.19.1" > versions/golangci-lint && make)
golangci-lint --version

Update Docker Compose

(cd ~/.dotfiles && echo "1.24.1" > versions/docker-compose && make)
docker-compose --version

Use node.

Loading nvm is slow (~1 to 2second), so it is wrapped in a function instead of being loaded with the shell.

loadnvm
nvm install --lts
node --version

Elpa fail

As of October 6th, 2019, elpa has been down for at least 2 weeks, preventing package installation from melpa.

Self contain reproduction of the issue (and check if it is still an issue):

docker run -it --rm ubuntu:19.04 bash -c 'apt-get update && apt-get install -y ca-certificates emacs-nox && emacs --no-init-file --eval "(progn (package-initialize) (package-refresh-contents))"'

Temporaty fix:

mkdir -p ~/elpaclone && cd ~/elpaclone && curl -L https://elpa.gnu.org/packages/archive-contents | perl -pe 's/(^\(1|\n)//g' | perl -pe 's/\]\)/])\n/g' | perl -pe 's/^ *\(([a-z0-9A-Z-]*).*\[\(([0-9 ]*).*(single|tar).*/\1-\2.\3/g' | perl -pe 's/ /./g' | perl -pe 's/single/el/g' | perl -pe 's/\)//g' | xargs -I {} curl -L  -O https://elpa.gnu.org/packages/\{\} && curl -L -O https://elpa.gnu.org/packages/archive-contents
;; init-package.el

(setq package-archives '(("gnu" . "~/elpaclone")
                        ("melpa" . "https://melpa.org/packages/")))

dotfiles's People

Contributors

creack 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

Watchers

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