3lLobo / starshipToml

My shell is cooler than yours !

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Makes me feel at home on any machine 💫

image

OmZsh

Install the zsh shell and OmZsh:

sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Starship 🚀

A pretty Terminal is a must! On windows or WSL install the Nerd Font in Windows Fonts. On Linux make sure fc-cache is installed.

./installNerdFonts.sh
./installStarship.sh

Vim

Should be installed by default on Ubuntu.

Install Vim

sudo apt-get install vim

Bash Zsh profile

Pulse all custom settings and aliases from .bashrc to the .profile file.

Then add in .bashrc:

  source ~/.profile

In .zshrc:

[[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'

fpath+=~/.zfunc
autoload -Uz compinit && compinit

Watch out for an infinite sourcing loop between .bashrc and .profile!

Clipboard history - copyQ

Clipboard manager for Linux. Pull and build.

Git

Set vim as default editor:

git config --global core.editor "vim"

Log in to GitHub:

git config --global user.name "Your Name"
git config --global user.email "

GitHub CLI

Login with the cli tool for operations to run smooth.

sudo apt install gh
gh auth login

gh uses MacVim to edit commit messages. Let's trick it into using vim:

sudo ln -s /usr/bin/vim /usr/bin/mvim

Rust ®️

The number one!!

Cargo + Rustup

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install Rust Analyzer

For the Rust Analyzer to work, the Rust source code must be installed:

rustup component add rust-src

Add the Russ Analyzer to VS Code.

Python

Ok let's face it, we aint doing much in Rust. Python aint going anywhere. Let's use the latest version, it's much faster and debugging has leveled up.

Install Python 3.11

the Easy Way

sudo apt install python3.11-full

or on older versions of Ubuntu:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.11 python3.11-dev python3.11-venv

the Hard Way

Get the download link for the latest official version of Python 3.11 from here

Then install into /usr/local:

cd /usr/bin
sudo wget https://www.python.org/ftp/python/3.11.3/Python-3.11.3.tgz
sudo tar xzf Python-3.11.3.tgz
cd Python-3.11.3
sudo ./configure --enable-optimizations | grep no

You'll see a list of missing gcc or c packages. Try to install sudo apt install as many of them as you can. Then install Python:

sudo make altinstall

Install pip3.11:

python3.11 -m ensurepip --upgrade

Now fix the symbolic link in /usr/bin to refer to the new version:

sudo rm /usr/bin/python3
sudo ln -s /usr/local/bin/python3.11 /usr/bin/python3

Same for pip3:

sudo rm /usr/bin/pip3
sudo ln -s /usr/local/bin/pip3.11 /usr/bin/pip3

Add the dist-packages folder to Python's system path, otherwise apt might brake:

sudo vim /usr/local/lib/python3.11/site-packages/dist-packages.pth

And add the following line:

/usr/lib/python3/dist-packages

Poetry

Install Poetry with the new version of Python:

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

Add the completion to our zsh:

mkdir ~/.zfunc
poetry completions zsh > ~/.zfunc/_poetry

Node.js

For anything web related.

NVM

For the latest version of NVM check the official repo.

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

Push the path to the .profile file:

echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.profile

Install and use the ltm version of Node.js:

nvm install lts
nvm use lts

Yarn

Install Yarn:

npm install --global yarn

Install Docker

If you are on WSL2, install Docker Desktop for Windows and enable the WSL2 integration.

OnDebian / amd64

The io package is maintained by debian and integrates with the apt ecosystem.

sudo apt install docker.io docker-compose 
sudo systemctl enable --now docker
sudo usermod -aG docker $USER

GPU Support

Attach the GPU to a container:

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker

Test your install

sudo docker run hello-world

MiniKube

For Kubernetes development.

Install MiniKube

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb

Install Kubectl

sudo apt-get update && sudo apt-get install -y apt-transport-https gnupg2
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo touch /etc/apt/sources.list.d/kubernetes.list
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

Install Helm

curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

Remote access

xrdp

Server:

sudo apt install xfce4 xfce4-goodies xrdp -y
sudo systemctl enable xrdp --now

Client:

sudo apt install remmina

SSH

Enable SSH server:

sudo apt install openssh-server
ssh-keygen -A
sudo systemctl enable ssh --now

Key based authentication:

ssh-copy-id user@host

Auto-upgrade

Update the system on every boot up:

sudo crontab -e

Then add:

@reboot DEBIAN_FRONTEND=noninteractive apt-get update && apt-get full-upgrade -y

About

My shell is cooler than yours !


Languages

Language:Shell 100.0%