phiresky's blog

About my personal projects and other stuff

sqlite-zstd: Transparent dictionary-based row-level compression for SQLite

An sqlite extension written in Rust to reduce the database size without losing functionality

Motivation (or side side projects) While working on my startup (DishDetective) I started a side project of an automatic time-tracking tool (timetrackrs), where I try to collect a lot of information about my habits for later analysis. The main component collects data from my computer about what »

Knowledge dump about LED Strips for indoor lighting

(somewhat unstructured thoughts)

Introduction / Motivation Most people use LED strips only for decorative/moon lighting (with intense colours but not very bright). I have done this too. But I thought why not replace all lighting with LED strips? By now, most people have heard that reducing artifical or blue or any light during the »

Data Export Day

Online data tends to disappear. I have a reminder so once per year I export as much data as I can from all online services that I use.

A few years ago, I was trying to get all transactions I had with a bank into a spreadsheet - but I realized that it only allowed me to export a CSV with the transactions from the past year. So all the older stuff I now only have in the form of paper or shitty PDFs. So I set myself a reminder to do »

Hosting SQLite databases on Github Pages

(or IPFS or any static file hoster)

I was writing a tiny website to display statistics of how much sponsored content a Youtube creator has over time when I noticed that I often write a small tool as a website that queries some data from a database and then displays it in a graph, a table, or similar. But if you want to use a »

An overview of typed SQL libraries for TypeScript

Using relational databases in a typed language is a pain unless you have great libraries to support you. There’s a lot of different libraries for TypeScript, but they all have their own advantages and flaws. Since it’s hard to find anything other than TypeORM, this is a short list of the »

SQLite performance tuning

Scaling SQLite databases to many concurrent readers and multiple gigabytes while maintaining 100k SELECTs per second

SQLite is an embedded SQL database. It’s extremely easy to setup, buildable as a single C file with libraries existing for basically all common programming languages. It doesn’t need any server setup or configuration since the SQL logic is run in the host process, and the database consists of only »

Automatic citation extraction from URLs

pandoc-url2cite[1] allows you to instantly and transparently cite most papers directly given only a single URL. You simply add a URL of a publication, and it will replace that with a real citation in whatever CSL[2] style you want. This means you can avoid dealing with Mendeley[3] or Zotero[4] and »

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.

rga is a line-oriented search tool that allows you to look for a regex in a multitude of file types. rga wraps the awesome ripgrep and enables it to search in pdf, docx, sqlite, jpg, zip, tar.*, movie subtitles (mkv, mp4), etc. ExamplesPDFs Say you have a large folder of papers or lecture slides, »

Creating a blog

Hello World! I finally decided to make a blog to put my ramblings and projects. After some deliberation I settled on using next.js, so I can use React+TypeScript, don’t need a server and the website is accessible without JS enabled. The content is written as markdown, though I’m adding some neat »