TIL - Automatically Set Your virtualenv
·321 words·2 mins
TIL python poetry hatch venv direnv
I’m a big fan of using direnv to set project-specific env variables. And at one point I was using it to automatically activate my poetry virtualenv whenever I entered the directory per this function.
TIL about Sloth
·75 words·1 min
TIL macos lsof utilities homebrew open source
While looking at my Github news feed today, I spotted an app via one of Jeff Triplett’s stars. The app is Sloth by Sveinbjorn Thordarson, and it provides a GUI frontend for lsof that can quickly show you which processes are interacting with various files, directories, IP sockets, or Unix sockets.
TIL: Show Hidden Files in MacOS Finder
·94 words·1 min
TIL macos hotkeys
This is one of those silly little things that I always feel like I’m the last to learn. Admittedly, when I’m working with hidden files, I’m usually on the command line or in a text editor that already shows them.
TIL - Importing annotations from future for concise Python typing
·110 words·1 min
Python 3.10 introduced several improvements for type hints, including a much more concise Union operator. This means that instead of using: def square(number: Union[int, float]) -> Union[int, float]: return number ** 2 You can instead write this:
TIL - Running make apidocs for Read the Docs
·196 words·1 min
I was hacking on my quote service the other day, and notice that Read the Docs wasn’t building my module level documentation, which meant that anyone that wanted to look at said modules in more detail was getting a 404 error.