Giter VIP home page Giter VIP logo

dotfiles's Introduction

dotfiles

Personal config files and steps for setting up a development environment from scratch.

Pairing Apple keyboard

Instructions here.

$ bluetoothctl
# ...

Zsh

$ sudo apt install -y zsh
# https://github.com/junegunn/fzf
$ git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
# https://ohmyz.sh/#install
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
$ sudo apt install -y tmux ripgrep jq

Ubuntu

$ sudo apt install -y htop netcat whois
$ cat /proc/sys/vm/swappiness
$ sudo vi /etc/sysctl.conf
$ sudo sysctl -p
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
$ echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Git

$ sudo apt install -y gh
$ sudo apt install -y git
$ sudo apt install -y vim
$ git config --global user.name "Eric Walker"
$ git config --global user.email "[email protected]"

Rust

$ sudo apt install -y ruby
# https://rustup.rs/
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ sudo apt install -y build-essential
# OpenSSL - https://github.com/sfackler/rust-openssl/issues/855#issuecomment-450057552
$ sudo apt-get install pkg-config libssl-dev
$ cd code/digraph/rust
$ cargo test

Node / Yarn

Instructions here.

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ nvm ls-remote
# Needed for OpenSSL
$ nvm install --lts
$ corepack enable
$ npm install --global yarn

Spotify

Instructions here.

$ curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add -
$ echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
$ sudo apt-get update && sudo apt-get install spotify-client

Linode / Kubernetes

$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
$ curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
$ echo "$(cat kubectl.sha256)  kubectl" | sha256sum --check
$ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
$ k get pods -A
# Postgres password

Postgres

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install -y postgresql postgresql-contrib
$ sudo systemctl start postgresql.service
$ sudo -i -u postgres
$ createdb digraph_dev
$ exit
$ sudo vi /etc/postgresql/14/main/pg_hba.conf # Change "peer" to "trust" for the row with an ip address
$ sudo systemctl restart postgresql.service
$ psql "postgres://postgres:@localhost:5432/digraph_dev"

Docker

Instructions for Ubuntu 22.04.

$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
$  curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
$ sudo apt-get update
$ sudo apt install docker-ce docker-ce-cli containerd.io -y
$ sudo usermod -aG docker $USER
$ newgrp docker
$ docker version
$ sudo systemctl status docker
$ docker run hello-world

Digraph

$ sudo apt install -y redis
$ nc -zv localhost 6379
$ redis-cli
$ mkdir code
$ gh repo clone emwalker/digraph
$ pushd digraph
$ pushd javascript
$ yarn install
$ yarn relay
$ popd ..
$ pushd rust
$ cargo test
$ popd
$ make proxy
$ make load-fixtures
$ vi .env
DIGRAPH_POSTGRES_CONNECTION=postgres://postgres:@localhost:5432/digraph_dev
DIGRAPH_SERVER_SECRET="..."
DIGRAPH_GITHUB_CLIENT_ID="..."
DIGRAPH_GITHUB_CLIENT_SECRET="..."
DIGRAPH_DATA_DIRECTORY="../../digraph-data"
$ make start-dev
$ make build-client
$ make build-executables
$ pushd rust
$ RUST_LOG=warn,digraph=info target/release/export --data-dir "../../digraph-data"
$ popd
$ make start-prod

dotfiles's People

Contributors

emwalker avatar

Watchers

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