Posts
-
mypy: found module but no type hints or library stubs
Linting a Python project, I was puzzled by the mysterious error: "found module but no type hints or library stubs" from mypy. The module was my own, with Pydantic definitions everywhere, so why the error? I was missing init.py files in some parent folders.
-
Faker providers for project specific data structure fakes, in Python
I am a big fan of Faker for testing. I find having a random mock data generator keeps tests clean. In fact, I tend to extend Faker with project specific providers. Here's how
-
Poetry-driven python project template with cookiecutter
My python toolchain for small projects does not change often. It makes sense to save it and then replicate it whenever I start a project. Or better, use cookiecutter and a config file to generate it
-
Migrating away from Google: Hello Proton Mail!
Google informed me they would start charging me for letting me use their mail servers with my gotofritz.net domain. Fair enough, infrastructure costs money. But if I have to pay, why pay them? I'm can shop around. And so I did.
-
Removing duplicates from youtube playlists with a Python script
Thanks to a bug while copying a youtube playlist with a Python script, I ended up with a lot of duplicates videos in the playlist. Surprisingly, the YouTube interface doesn't let you remove them. So I put together another small Python script
-
Adding videos to a youtube playlists via a terminal python script
I wanted to duplicate another user's playlist to one of my free google accounts. But it's no longer possible from the web interface. None of the methods described in various SO answers are functional, they are obsolete. But it can be done with a Python script in your terminal.
-
Migrating Thunderbird message filters from another machine
Thunderbird doesn't sync message filters. Its roots are from ancient times, before distributed computing was prevalent. If you want to copy your filters from one machine to another you have to do it the old-fashioned way, by copying config files
-
Stopping cSpell from using .gitignore
cSpell is a spelling plugin for VS Code. Not my favourite, but the only one I found. It isn't particularly well documented though. It avoids spell checking files in .gitignore. To stop that, you need to add
"cSpell.useGitignore": false,
to your settings -
Remove lines matching some patterns from all files in a dir
A CLI task I find myself doing often with sed
-
How I built a markdown driven static website with SvelteKit and Tailwind
In my last post I ported my existing blog to SvelteKit, to get to used to it. Now I am going to build a new version from scratch, using markdown and tailwind. I will use Matt Jennings's excellent SvelteKit blog template as seed.