/bashrc

My ~/.bashrc. Includes npm autocompletions, git aliases, and more!

Primary LanguageShellMIT LicenseMIT

Python

~/.bashrc

My ~/.bashrc configurations. It includes npm autocompletion, python virtualenv wrappers, git aliases, and more!

🚀 Useful tools

Installation steps for tools I download in almost every dev environment

pyenv and pyenv-virtualenv

Great for managing multiple versions of python on the same machine

curl https://pyenv.run | bash

Update ~/.bashrc with pyenv and pyenv-virtualenv references

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
eval "$(pyenv virtualenv-init -)"
pyenv install 3.11
pyenv virtualenv 3.10 my-virtualenv-3.10
pyenv version
pyenv activate my-virtualenv-3.10

virtualenv

sudo apt install python3-virtualenv

virtualenvwrapper

Assumes python3 and pip3 installed.

pip3 install --user virtualenvwrapper
# Run in shell after installer OR Add this to ~/.bashrc
export WORKON_HOME=~/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv
mkdir -p $WORKON_HOME
. /home/$USER/.local/bin/virtualenvwrapper.sh
# Alternatively,
# export VIRTUALENVWRAPPER_VIRTUALENV=/home/$USER/.local/bin/virtualenv
export CLOUDSDK_PYTHON=/usr/bin/python2

jq

sudo apt-get install jq

postgresql

# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

# Update the package lists:
sudo apt-get update

# Install the latest version of PostgreSQL.
# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
sudo apt-get -y install postgresql

peek

sudo add-apt-repository ppa:peek-developers/stable
sudo apt update
sudo apt install peek

shutter

sudo apt install shutter

vscode

git secret

sudo sh -c "echo 'deb https://gitsecret.jfrog.io/artifactory/git-secret-deb git-secret main' >> /etc/apt/sources.list"
wget -qO - 'https://gitsecret.jfrog.io/artifactory/api/gpg/key/public' | sudo apt-key add -
sudo apt-get update && sudo apt-get install -y git-secret

net-tools

sudo apt-get update && sudo apt-get -y install net-tools
ifconfig

docker

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.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-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

curl

sudo apt install curl

vim

sudo apt install vim

go

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz
go version

nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

git

sudo apt install git-all

ssh client/server

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-client openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
sudo ufw allow ssh

wget

sudo apt install wget

yq

VERSION=v4.2.0
BINARY=yq_linux_amd64
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\
  tar xz && mv ${BINARY} /usr/bin/yq

kubernetes - kubectl

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

kubernetes - kind

curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.14.0/kind-linux-amd64
chmod +x ./kind
mv ./kind /ur/localbin/kind

wait-for-it

sudo apt install wait-for-it

~/.psqlrc