A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
Key/Command | Description |
---|---|
Tab | Auto-complete files and folder names |
Ctrl + A | Go to the beginning of the line you are currently typing on |
Ctrl + E | Go to the end of the line you are currently typing on |
Ctrl + U | Clear the line before the cursor |
Ctrl + K | Clear the line after the cursor |
Ctrl + W | Delete the word before the cursor |
Ctrl + T | Swap the last two characters before the cursor |
To remove a submodule you need to:
Python virtual environment management can be tricky, but it's essential for isolating dependencies.
You have several options for virtual environment managers. We provide instructions for uv, venv, and conda below.
uv is relatively new, but it's the fastest and becoming very popular. If you don't already have a Python virtual environment manager, we suggest using it.
These steps show how to install Tailwind CSS in a Pelican project, purge and minify it so you don't have to reference a 3+ MB CSS file but only several kB.
virtualenv venv
. venv/bin/activate
pip install nodeenv
nodeenv env
. env/bin/activate
npm install postcss postcss-cli autoprefixer tailwindcss purgecss cssnano