Bunch of scripts useful to add when starting on a new machine
On your new machine, run:
git clone https://github.com/bpiyush/new-machine-setup-scripts.git
This will clone the repo and you are ready to go!
Most parts of this repo are borrowed from here. Check it out for longer version.
See bash_aliases.sh for useful aliases and useful bash utility functions. You may add a file .bash_aliases
in your home directory, you can simply copy the relevant file:
cp bash_aliases.sh ~/.bash_aliases
Do not forget to source it in .bashrc
:
if [ -f ~/.bash_aliases ]; then
source ~/.bash_aliases
fi
In order for seamless github functioning, it is advised to set SSH creds instead of using password everytime you use git. Refer to set_git_creds.sh
for more details. Run:
bash set_git_creds.sh
Now, the public key will be copied to your clipboard. On github, go to Settings > SSH & GPG keys > Add new key -> Add the key!
For colorful ls
command, set the following in your ~/.bashrc
alias ls='ls --color=always'
# Set the terminal prompt
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="=> \[\033[32m\] \W\[\033[34m\]\$(parse_git_branch)\[\033[00m\] [\A] $ "
Download the relevant installer from here.
cd /your/desired/location/
# replace the link with link to your relevant installer
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh
Run the installation:
bash Miniconda3-py39_4.10.3-Linux-x86_64.sh
If you'd prefer that conda's base environment not be activated on startup, set the auto_activate_base parameter to false:
conda config --set auto_activate_base false
This may be already installed by root. Check virtualenv --version
.
This may be already installed by root. If not, ask your root to install it.
Please follow this stackoverflow answer.
Install VSCode on your local Machine (e.g. Mac). You can edit repositories on your remote machine simply by the power of VSCode + SSH. Install the Remote - SSH extension and you should be done!