Today I learned (TIL) · 2024

TIL yearly
Published

June 11, 2024

11. June

Use git force push safely (2023) with

git push --force-with-lease --force-if-includes

1. April

For Python, I’ve configured my OS to prevent pip installations outside of virtual environments by setting the PIP_REQUIRE_VIRTUALENV environment variable. For this configuration export PIP_REQUIRE_VIRTUALENV="true" is set in my .zshrc file. The configuration was inspired by the post On pip isolation.

17. March

Creating the last post I realized that it is more convenient to work in VS Code with a Jupyter notebook (ipynb) than in a Quarto document (qmd). The notebook enables the use of Jupyter keyboard shortcuts whereas the Quarto document usage is rather static in VS Code.

The documents can be converted into the other format with

quarto convert

10. March

Recently, I started using the just command runner and have now used it regularly in several of my Python projects.