I'm back on VSCode
I’m back on VSCode. I’ve used neovim for a while. I started on VSCode and once I learnt the vim motions I really wanted to move to neovim but I didn’t want to have to deal with the stress of setting it up. Eventually the vim vscode extension started being buggy and freezing and that forced me.
The first time I tried to set everything up myself, you have probably predicted that this didn’t go too well. Fortunately, not too long after that I discovered LunarVim. I set that up and I was of to the horses. LunarVim lost it’s appeal to me when I got to a place when I needed to customise something. So I switch to NvChad which was a delight. I eventually switched to AstroNvim primarily because of their plugin ecosystem where things are already preconfigered with the common settings. This reminded me of vscode’s plugin system. At this point I didn’t think I’d change. However, last holiday I figured I’d give vscode another shot since it’s been so long and I found that the vim plugin is not so buggy. So I ported over most of my most used key bindings and that’s what I’m using now.
Now that I’m back I realise there are some quality of life things I like about vscode that I’d forgotten. Small things like auto import and cleanup of imports. Anyway the rest feels very much like my AstroNvim setup.
Clean up merged branches
I use the following to clean up merged branches from remote:
Owning my own reading log
I liked Tom MacWright’s take on why he’s “leaving” GoodReads and owning his own reading log. I liked it so much, in fact, that I decided to do the same. So I exported all my books from GoodReads. The export comes as a CSV so I found a CSV to JSON convertor online and turned it into JSON. Wrote a little script to split the JSON into individual markdown files for each book. And then created a collection on my Astro site.
I no longer have all the info about the books and the book cover from GoodReads. Fortunately the export comes with an ISBN and I can use that on the Open Library API to fetch the cover if they have it and display it on my site. The rest was html and css and now I have a books section on my site.
Using connection pooled URL with Supabase and Prisma
If you ever encounter this error while trying to run a migration with prisma on your supabase database:
You’re likely using the wrong URL to connect to your database. Prisma needs a different URL for doing migrations if your normal database URL uses connection pooling. For more information, see this article for a more comprehensive guide
How to remove file from Git history
I have googled this enough times for me to keep it in my own notes.
From time to time I find that in my building and carelessly using git add .
I have added a file or files into git that I shouldn’t have had in there in the first place. When this happens I want to delete the file from the git history completely. Maybe there’s a better way to do that but this does what I want.
Anyway, the answer to “How to remove file from Git history” that I always use is here. This is the specific answer I use.