The code spell checker plugin, formerly cspell, works well for “normal” vscode project, but wasn’t doing anything for a workspace based project.
Here’s a copier project template that sets up everything I need for a modern Python CLI project in about 30 seconds.
I needed to generate files of a certain size for performance testing - their contents were irrelevant. The
dd
utility was perfect for the task.Actual Budget is the open source budgeting app I replaced YNAB with. They have now merged all the Actual apps into one repo, which meant running a migration.
It used to be possible to click on a button in a YouTube channel and view all of the channels’ video as a single playlist. The button is gone, but the playlist is still there.
On macOS,
netstat
is a BSD-based tool that is still fully supported. It is great for seeing open connections, routing tables, and interface stats. When you want to see which process owns a connection or port,lsof
is the tool to use.If you have the Python extension in VSCode, you can open and run Jupyter notebook directly in the IDE. But what if you want to work on the actual JSON source?
Sharing Google Maps links on an iPhone used to be a pain. They’d open in the browser, and when you tapped ‘open in the app’ it led nowhere.
When you want to check how your Mac’s disk and CPU are doing, or peek at memory and swap activity, the commands iostat and vm_stat come in super handy. Both are built-in and give you quick snapshots of system performance.
While looking at ways to run MLflow with uv on Github, I came across this gem of a comment which is the perfect, most compact introduction to uv
Once again my Javascript-based blog became victim of bit rot after only a few months. So I ditched it and moved to Hugo.
I finally had the chance to test Astral’s uv tool. It’s very good, from what I’ve seen so far.
iOS doesn’t support .ogg files. If you have Anki cards with audio in that format, they’ll need to be converted to .mp3. Here’s how
Debugging in Kubernetes is not rocket science, but it can feel like it when your pod refuses to behave. Here are some useful
kubectl
commands.Asking Git to display all the logs for a given branch, or to squash commits within a branch, is not as straightforward as you might expect if you’ve never tried it before.
pip freeze > requirements.txt
is the canonical way to capture all the packages you have installed in a Python project. I am not sure why; it doesn’t do what you expect.I started this post to keep track of the process, thinking it was going to be a slog. Instead it took me all of 2 minutes and It Just Works. Mind. Blown.
I was trying to install pygraphviz on my M1 laptop using pip, but I found it impossible. Luckily the Dev Container VSCode extension allows me to use it with docker.
gh is a lovely CLI tool from GitHub that lets you manage your repos from Terminal, including downloading license and .gitignore files.
Clearing the command history is good practice when, for example, one has mistakenly pasted sensitive info.
❯ history -c
will do the trick. More details inside.Thanks to Elon Musk, it’s now socially acceptable for developers to ditch their Twitter accounts. While I’m keeping mine to be able to read long threads, I recently decided to delete all of my tweets and start fresh. I like to think of it as a “quiet quitting”
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.
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.
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
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.
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
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 settingsA CLI task I find myself doing often with sed
Prettier autoformatting screws up Django html templates in Visual Studio Code. For example, it puts tags on the same line when they shouldn’t be. The fix is pretty simple and involves a couple of different formatting extension.
I have recently switched to Thunderbird from Gyazmail, the obscure mail program I have been using for years. Here are some setup tips that worked for me
One can easily make OS X read out text from the CLI with the say command. But what to do when it gets stuck and stops working?
I got myself one of these ergonomic mice, connected it to my Mac and configured the extra buttons. I like it
If you are used to React’s Styled Components, assigning CSS values dynamically in Svelte can be baffling at first.
All the OS X apps I use - for when I need to reinstall a new machine.
Time Machine does its own backup magic, but sometimes you just simply want two identical copies of the same hard disk. For that rsync is the way to go
tidy is a command line tool for formatting XML and HTML. Also available as a Visual Studio Code Extension
Software updates can be quite tedious - you have to click a lot of buttons, then get into the Apple Store etc. But you can avoid all that by running it from the command line.
OS can sometimes take forever to resolve hosts setup on my local machine. Here is how I solved it.
Yosemite updates Apache to 2.4. A couple of things stopped working from my previous installation, including autogenerated directory listings. Here’s how I got them back.
Storing your CLI config files (.bash_profile and all the rest) on github makes sense - as a backup, but also to compare and learn.
Sometimes you need to copy your local version of a project under subversion to a new location, without all the .git stuff. Here’s a couple of ways of doing it.
To make a quick voice recording with OS X: open Quick Time Player, under the File menu there is a “New. Audio Recording” entry. It automatically saves .mov files in your Movies folder, which you can then open in Audacity or the editor of your choice.
To have a $ in your replace strings in Javascript regular expressions, it needs to be escaped with another $
Assorted ImageMagick commands for combining images
Where to put unix based scripts on a Mac without them getting in the way? Simple: create a bin folder in your home directory, and add it to the path:
export PATH=~/bin:$PATH
Running the status command in the command line version of subversion returns a list of files with a one letter code in front of each file name. Here's a list of those one letter codes and what they mean.
In OS X, PDF files can be concatenated manually using Preview. But if you are happy using Terminal there’s an easier way, thanks to a Python script installed by default in /System/Library/Automator
Looking for files inside an archive, without having to extract them first using Terminal.
Finding files that were changed in the last day, sorted by size, using the Terminal