Safari Extensions

List of safari extensions I’ve created: App Store Description Adds fuzzy search function to help you find tabs quickly, even when you can’t quite remember the exact title Automatically identifies and closes duplicate tabs, putting an end to unintentional tab duplication Simply opens Linkding page with your URL pre-populated. It also provides an Options page where you can customize your linkding server address Configures which websites to redirect using plain URLs or, for advanced users, regular expressions.

Yet Another Word Based Suggestions extension for vscode

TLDR: https://github.com/tuan/yaws So I’ve been using Vscode’s Neovim extension for a while. This extension is, IMO, integrated better with VIM (or NeoVim to be exact) that the other VscodeVim extension. But lately, the neovim extension has been having problem with buffer synchronization, i.e. the vscode’s buffer and neovim’s buffer get out of sync. I’m not sure what the root cause is. It’s probably caused by conflicts or race conditions among multiple extensions that all try to update text editors at the same time, e.

Unpoly Notes

Last weekend I spent some time playing with HTMX and created this app. While HTMX significantly simplifies the server and client interactions, for example I no longer need to create separate REST APIs to serve the client, but I feel like the DevX is not great. There are 2 things I had to deal with while working on that simple vacabulary app are: 1 - No REST API endpoints needed, but new endpoints to return partial HTMLs are needed.

The joy of using simple tools

I’ve been building a few toy projects. After leaving my previous job, I miss all the nice fancy DevOps systems or pipelines that I previously had, for example monitoring and CI/CD. So I looked around to see if I can find OSS alternatives. The good thing is that there are plenty out there, but the bad thing is that they are way too complicated for the kind of toy projects that I’m building.

HTMX Newbie's Notes

Not sure which bubble I’m currently in now, but for some reasons I have heard a lot about HTMX lately. I’ve decided to build something with HTMX to see what it actually feels like in practice. The project is a simple page that allows users to look up a word and quickly add it to Anki, a flashcard program. The current working prototype is https://vocab.tentativeknowledge.com. The adding note to Anki feature currently only works on desktop and depends on AnkiConnect add-on.

Django-allauth Template Customization

TLDR: My notes on how to customize various templates used by django-allauth. django-allauth provides default templates for many scenarios such as authentication, registration, password reset, etc. These templates can be found at https://github.com/pennersr/django-allauth/tree/main/allauth/templates. You can see that there are quite a few of them. So in this notes, I just focus on login template used for username/password authentication. The approach to customize other templates will be similar. As of this writing Jan 2024, the current implementation has the following structure:

Quickly Find and Terminate Process

TLDR install fzf and kill -9 **<TAB> This is a quick one. I’ve been using fzf for over 6 years since I discovered the tool, but I’ve never known that it can help you find a process and kill it in just one command. Here’s what I usually did when I need to kill a rogue process: ps aux | grep process_name: note down the process id kill -9 process_id Now, with fzf installed, I can just do: kill -9 **, then press TAB.

Fullpage vs Progressive Loading

This is a follow up from previous post. In that post I imagined an UX where we progressive load the landing page of hn.tentativeknowledge.com one by one from top to bottom. Turns out that the current implementation kinda makes that an easy change. I don’t even need to use usePriorityQueue hook that I created in previous post. Currently, when we load the frontpage we do the followings in order: Make a request for top 20 stories with both title and url fields Server makes 2 requests to Hackernews: 2.

Queue logic executions among React components

This is just me hacking for fun. So, I was entertaining the idea of improving the performance of hn.tenativeknowledge.com by lazy loading the links when the page load. The current implementation is sort of doing that already. However, I was wondering if I could focus the computing resource on processing and rendering of top links first. Users would likely interact with links at the top before other links down the page.

Links in Hacker News Comments

TL;DR I created this Links in Hacker News’s comments page. This page allows you to browse Hacker News ..in a different way. When I browse Hacker News, I usually glance at the titles of the submissions on the front page to see if the topics are interesting to me. … Then I dive right in to the comments, because I find that the comments on hacker news are often time even more interesting the original submission.