Local development settings
Editor’s note: The post was origially published in February 2019 and being updated as needed
Python Virtual Environment
Note: Install the build dependencies for pyenv
# Install dependencies
sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl git \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
# Install the required version using pyenv
pyenv install 3.14.3
pyenv global 3.14.3
# Configure virtual environment
pip install virtualenv
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
deactivate
Build Jekyll Static Website
# Running Jekyll build
gem install bundler jekyll
gem update --system
gem update
bundle install
bundle exec jekyll build
bundle exec jekyll serve
Visual Studio Code - settings.json
{
"editor.fontSize": 24,
"debug.console.fontSize": 24,
"terminal.integrated.fontSize": 24,
"editor.fontLigatures": false,
"editor.minimap.enabled": false,
"telemetry.telemetryLevel": "off",
"workbench.startupEditor": "none",
"workbench.editor.empty.hint": "hidden",
"editor.stickyScroll.enabled": false,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"editor.formatOnPaste": true,
"editor.quickSuggestions": {
"other": "off",
"comments": "off",
"strings": "off"
},
"editor.suggestOnTriggerCharacters": false,
"editor.acceptSuggestionOnCommitCharacter": false,
"editor.inlineSuggest.enabled": false,
"editor.parameterHints.enabled": false,
"editor.wordBasedSuggestions": "off",
"editor.snippetSuggestions": "none",
"rust-analyzer.runnables.extraEnv": {
"RUST_LOG": "info,turmoil=warn",
"RUST_BACKTRACE": "0"
},
"workbench.trustedDomains.promptInTrustedWorkspace": true,
"ocaml.sandbox": {
"kind": "opam",
"switch": "default"
},
"python.analysis.typeCheckingMode": "off",
"cmake.pinnedCommands": [
"workbench.action.tasks.configureTaskRunner",
"workbench.action.tasks.runTask"
],
"terminal.integrated.initialHint": false,
}
Configurations
VIM
# Create a .vimrc file in the home directory
# Add the below snippets to enable *formatting*, *line number*, *file type indent* and *custom file type indent*
# Supporting .tf file as YAML
filetype plugin indent on
syntax on
set number
autocmd BufEnter *.tf :setlocal filetype=yaml
Bash
alias python=python3
alias pip=pip3
# Colour scheme for terminal
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;31m\]\w\[\033[00m\]\$ '
# Adding the GPG setup for signing the GitHub commits
export GPG_TTY=$(tty)
# PATH for the OCAML
export OCAML_DIR="$HOME/ocaml"
export PATH="$OCAML_DIR:$PATH"
# PATH for Go
export GOPATH=$HOME/go
export GOPROXY=direct
export GO111MODULE=on
export CGO_ENABLED=0
export PATH=$PATH:$GOPATH/bin
# PATH for Zig
export PATH=$PATH:/usr/local/zig
# Export PATH
export PATH="/usr/local/sbin:$PATH"
# Adding the pyenv configuration
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Adding the nvm configuration
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# PATH for Rust
. "$HOME/.cargo/env"
# PATH for SDKMAN
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
Git
# .gitconfig contents
[user]
name = <username>
email = <email>
signingkey = <gpg-signing-key>
[commit]
gpgsign = true
[init]
defaultBranch = main
SSH
Host github.com
IdentityFile ~/.ssh/id_ed25519
GPG
# List and export keys
gpg --list-keys
gpg --output private.pgp --armor --export-secret-key <email>
gpg --output public.pgp --armor --export <email>
# Import keys
gpg --import private.pgp
gpg --import public.pgp