TIL: Switching to full screen mode in VSCode

For those times when you want to avoid using the mouse to improve your desktop layout. | Continue reading


@daniel.feldroy.com | 2 days ago

TIL: Running UV outside a virtualenv

Breaking the rules to satisfy continuous integration. | Continue reading


@daniel.feldroy.com | 11 days ago

Keynote at PyCon Lithuania 2024

My key note and the first return to the homeland of Lithuania in over 100 years. | Continue reading


@daniel.feldroy.com | 1 month ago

TIL: Using URLs to highlight and scroll to text

When you want to link to content on a web page but it doesn't have CSS selectors, append this to the URL: #:~:text=TEXT_TO_FIND Here's some reference examples: https://daniel.feldroy.com/posts/2023-02-programming-languages-ive-learned#:~:text=python https://daniel.feldroy.com/pos … | Continue reading


@daniel.feldroy.com | 2 months ago

TIL: Writing decorators for classes

To my surprise writing decorators for classes is easier than for functions. Here's how to do it in annotated fashion with an unnecessary decorator that doesn't accept any additional arguments. # Write a callable that accepts a cls as an argument def tools(cls): # Write function … | Continue reading


@daniel.feldroy.com | 4 months ago

Recap of 2023 and Resolutions for 2024

Another year in orbit around a star. Recap for 2023 We moved to London Truly enjoyed being the husband of Audrey Roy Greenfeld Embraced the delights being the father to Uma Roy Greenfeld in her fourth year in the universe I trained more in Brazilian Jiu-Jitsu (BJJ) I tried HEMA a … | Continue reading


@daniel.feldroy.com | 4 months ago

TIL: Change older git commit

Typically I try to avoid changing older commits in a pull request. My reasoning has a tiny bit to do with preserving history and lots to do with being resistant to trying new things. Finally I got around to looking this up today, it is easy to do. WARNING: Do this on branches of … | Continue reading


@daniel.feldroy.com | 5 months ago

TIL: Forcing pip to use virtualenv

Necessary because installing things into your base python causes false positives, true negatives, and other head bangers. Set this environment variable, preferably in your rc file: # ~/.zshrc export PIP_REQUIRE_VIRTUALENV=true Now if I try to use pip outside a virtualenv: dj-note … | Continue reading


@daniel.feldroy.com | 5 months ago

Three Years at Kraken Tech

A summary of the past year as I finish my third year working for Kraken Tech, an Octopus Energy Group subsidiary. Note: As I write this I'm recovering from a sprained shoulder I received in a bicycle accident that makes it hard to type. I'm mostly using voice-to-text, so the text … | Continue reading


@daniel.feldroy.com | 5 months ago

Minimal CSS libraries

Minimal CSS frameworks do not use classes, rather modifying the look of HTML components. That means that any CSS classes added are easier to discover and read. I'm someone who struggles with CSS and the custom CSS of this site combined with complex non-obvious HTML (example being … | Continue reading


@daniel.feldroy.com | 6 months ago

Splitting Git Commits

Something I periodically do and need to document here where I can find it fast. To reset the most recent commit: git reset HEAD~ This reverts the commit. Then you can commit individual or groups of files in multiple commits What if your commit isn't the most recent one? Use an in … | Continue reading


@daniel.feldroy.com | 6 months ago

Autoloading on Filechange using Watchdog

Using Watchdog to monitor changes to a directory so we can alter what we serve out as HTTP. Each segment is the evolution towards getting it to work. Serving HTTP from a directory I've done this for ages: python -m http.server 8000 -d /path/to/files Using http.server in a functio … | Continue reading


@daniel.feldroy.com | 6 months ago

TIL: Fixing YAML

I got tired of manually correcting and prettifying YAML only to run into periodic instances where my cleanup broke configurations. Alas, yamllint only tells you what's wrong. I would rather have an easy-to-use CLI tool that does all the work for me. Thanks to David Winterbottom f … | Continue reading


@daniel.feldroy.com | 6 months ago

TIL: Skipping git pre-commit

For saving WIP commits to a remote repo. Just add --no-verify to whatever you are doing: git commit -am "Fun code noodling" --no-verify git commit --amend | Continue reading


@daniel.feldroy.com | 7 months ago

TIL: Capture stdout & stderr with pytest

I wish I knew this earlier, but I know it now thanks to Cody Antunez. Here it is: import sys def test_myoutput(capsys): # or use "capfd" for fd-level # Write some text print("hello") sys.stderr.write("world\n") # Capture the text captured = capsys.readouterr() # Test … | Continue reading


@daniel.feldroy.com | 7 months ago

We moved to London!

We're going to be here for a while, so I thought I'd let everyone know. Where are you living? In central London, not far from Oxford Circus. We had looked at living more on the periphery, but the cost of rent was the same or barely cheaper - not enough to cover the cost of commut … | Continue reading


@daniel.feldroy.com | 7 months ago

TIL: Rich.console.status for slow processes

For building CLI, there's so much that rich provides that I can't imagine not using it. Here's adding a moving bar that updates: from time import sleep from rich.console import Console console = Console() with console.status( "[bold red]Starting...[/bold red]", spinner="bouncin … | Continue reading


@daniel.feldroy.com | 7 months ago

TIL: Finding and ignoring files with Glob

Glob is a really handy tool for finding filepaths. It resembles regular expressions but the syntax is different. Finding matches is easy: # finds python files in the current working directory *.py # finds all the nested python files. **/*.py What I didn't know until today is how … | Continue reading


@daniel.feldroy.com | 7 months ago

TIL: Poetry PyPI Project URLS

Poetry has its own location for urls in the [tool.poetry.urls] table. Per the Poetry documentation on urls: "In addition to the basic urls (homepage, repository and documentation), you can specify any custom url in the urls section." [tool.poetry.urls] changelog = "https://github … | Continue reading


@daniel.feldroy.com | 8 months ago

TIL: pytest with breakpoints

To inject a breakpoint into a failing pytest run, add --pdb to your pytest command: py.test --pdb This will drop you into a pdb session at the point of failure. You can then inspect the state of the program just like you would if you injected a breakpoint(). | Continue reading


@daniel.feldroy.com | 8 months ago

PyPI Project URLs Cheatsheet

See these links in the image below? I want every PyPI project to have them in the left column. The challenge is the PyPI project URLs spec is defined only in code. Here's my cheatsheet explaining how to configure them. I'll update this as I learn more (suggestions welcome!). Exam … | Continue reading


@daniel.feldroy.com | 9 months ago

Review of Paultons Park

This weekend we took 4.5-year-old Uma to Paultons Park amusement park near Southhamption, UK. It was her first real amusement park experience, and she had a grand time. The many positives: The park is really well maintained. Everything felt clean and proper, at the Disneyland lev … | Continue reading


@daniel.feldroy.com | 10 months ago

BJJ Training Tips

I started Brazilian Jiu-Jitsu in early November 2022. Against most other white belts I usually can't be submitted and have landed a few submissions of my own. I'm not big or strong. I use these rules tip by my coaches and fellow players of the sport. Tap early and tap often. Bett … | Continue reading


@daniel.feldroy.com | 11 months ago

Converting from bleach to nh3

Bleach is deprecated, here's how to come close to replicating bleach.clean() using the nh3 version of .clean(). import nh3 def clean_string(string): # The arguments below being passed to `nh3.clean()` are # the default values of the `bleach.clean()` function. return nh3.cle … | Continue reading


@daniel.feldroy.com | 11 months ago

My 2023 Fitness Journey

Losing my fitness As the pandemic went on I struggled with fitness and weight gain issues. I had injured both knees right before we went into quarantine. I'm also much more consistent working out in groups or with a partner than by myself. So I lost muscle mass as I gained weight … | Continue reading


@daniel.feldroy.com | 1 year ago

AWS Requests Auth

David Muller, the author of Intuitive Python pointed me at this handy snippet of code. Thanks Richard Boyd! import boto3 from botocore.auth import SigV4Auth from botocore.awsrequest import AWSRequest import requests session = boto3.Session() credentials = session.get_credentials( … | Continue reading


@daniel.feldroy.com | 1 year ago

Programming languages I've learned

Matt Harrison asked in a tweet what my programming history was, so here's a list of the programming languages I've learned. AppleBasic (ancient history) My first computer was an Apple ][+. I learned AppleBasic from a book that came with the computer. I wrote oodles of text-based … | Continue reading


@daniel.feldroy.com | 1 year ago

Converting Markdown Headers to Checklist

For those times when you write out a long markdown document that you want to convert to a checklist. A future modification will be to link to the original GitHub or Notion headers so that you can click on the checklist item and jump to the original content. Converting Markdown He … | Continue reading


@daniel.feldroy.com | 1 year ago

Configuring Sphinx Auto-Doc with projects having Django dependencies

How to make it so projects with Django as a dependency benefit from Sphinx's auto-documentation features. The Problem I want to be able to document open source packages with Sphinx (ex. xocto) and have Sphinx automatically document the Django helpers. This isn't quite the same as … | Continue reading


@daniel.feldroy.com | 1 year ago

Resolutions for 2023

Resolutions for 2023 Continue to work on saving the planet Since November of 2020 I've been at Octopus Energy using my skills and talent to address climate change. I plan to continue that effort. You can read my thoughts on why I'm so dedicated to our mission here. Continue my fi … | Continue reading


@daniel.feldroy.com | 1 year ago

Exploring the Bunch Class

Continue reading


@daniel.feldroy.com | 2 years ago

The Thirty Minute Rule

Continue reading


@daniel.feldroy.com | 2 years ago