Skip to content

emwalker/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Personal config files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published