Blog
Articles and short notes on Django, Postgres, web security, tooling and hobby projects.
-
Efficient hybrid search on vector database using AlloyDB inline filtering
Experimenting with Scalable Nearest Neighbour (ScaNN) index for hybrid query on embedding vector with metadata columns
-
Django design pattern
Building Django project like a Java developer: design pattern for complex web projects
-
API Serialization Performance Comparison
Comparing API performance in Django REST Framework, Django Ninja, FastAPI, and Golang.
-
Postgres ltree
Postgres extension for querying tree data efficiently
-
Exception handling in Django REST Framework
Centralized exception handling in a very opinionated framework
-
Web security: Cross site request forgery (CSRF)
How cross-site request forgery works, why the Referer header is not enough, and how SameSite cookies and CSRF tokens prevent it.
-
Web security: Cookies and Same origin policy
Examining how cookies and same origin policy are parts of different security models
-
Web security: Content security policy
Some notes on a security policy that is a pain in the butt to set up for SPA that will fail you security audit without
-
Web security: Cross site scripting (XSS)
What cross-site scripting is, the difference between reflected and stored XSS, and how to defend against injected scripts.
-
Working with tree data structure efficiently in PostgresSQL and Django
Materialized path for navigating tree data structure in relational database
-
Django custom lookups
Custom re-usable query look up for Django ORM
-
Removing files from Git commit history
Purge large or sensitive files from every commit with BFG Repo-Cleaner, then clean up and force-push the repository.
-
Using Conda environments in Jupyter Notebook
Create a Conda environment, register it as a Jupyter kernel, and remove it again when you are done.
-
Setting up Python, XGBoost, Scipy on M1 Mac
A guide to setting up Python, XGBoost, and Scipy on M1 Macs using Rosetta
-
Setting up Gitbash, Terminal on Windows
Set up Git Bash on Windows to use Anaconda Python, plus a fix for the Django createsuperuser TTY error.
-
Setting up SSH for Git
Generate an SSH key, configure ~/.ssh/config and add the key to GitHub, plus per-repository deploy keys and signed commits.
-
Automating aquarium water changing
DIY automated aquarium water changer using Arduino