This post is about moving a Next.js application off Supabase (database + auth + realtime + storage + database webhooks) to a self-hosted Postgres, Drizzle ORM…
All Stack Solutions 49 posts
2026
A Vitest suite can drop to less than half of its run time after one boring find-and-replace. Finding the cause Vitest can report how long each import…
Picture this: users suddenly can’t upload files. Every upload request hangs until the CDN/proxy in front gives up with an origin timeout (e.g. Cloudflare’s 524…
Imagine production Postgres pinned near 100% CPU, and pg_stat_activity showing almost every active backend running the same thing: the function behind the…
This is one of those bugs that only happens under load: Node.js apps suddenly stop answering every database query, forever, until the container is restarted.…
A short one, but it can cause failed rollouts. During deploys, new containers keep failing their health check and the old containers stay running, even…
Billing bugs are the worst kind of bugs: customers notice them before you do, and they notice them on their bank statement. Here are a handful of Stripe…
When moving CI/CD from GitHub-hosted runners to a single self-hosted server with several runner instances (e.g. 3-4), the motivation is usually simple: Actions…
After a deploy, an error tracker often receives a small burst of ChunkLoadError s. The cause is classic: A user has the app open (or a cached page) built…
2024
Are you looking to build a real-time, browser-based terminal that streams interactive shell sessions from an AWS EC2 instance, with full observability and…
Background In this article, we will share how to upgrade the dj-stripe package flawlessly and carefully. As we know, dj-stripe always squashes the…
Sometimes we have case where we want to upgrade the 3rd party packages. But, we have case where the migration files were totally different with the old…
2021
Previously makesure you already install the django-recaptcha , don’t miss also to Sign up for reCAPTCHA Add 'captcha' to your INSTALLED_APPS setting.…
For example someone reported a crucial bug by using django-tellme , then we don’t want that screenshot to be accessable by any users except our…
2020
Previously, the Django has X-XSS-Protection: 1; mode=block to handle this case. Some browsers have the ability to block content that appears to be an XSS…
I am working on a django based web app that takes python file as input which contains some function, then in backend i have some lists that are passed as…
1. Add the base_site file inside templates/admin/base_site.html . 2. Custom language middleware, in your file middleware.py 3. And then in your…
Amazon S3 or Amazon Simple Storage Service is a service offered by Amazon Web Services that provides object storage through a web service interface. Amazon S3…
Kindly follow these steps: Delete all migration files Truncate the django_migrations table comment the new boolean field run python manage.py…
The important things you should fill with these; Key Value Storage Type General Purpose (SSD) DB Instance class db.t2.micro (for…
For example I have this 3 fields as question_set , question and folder . I need to assign all of this fields into raw_id_fields inside the admin.ModelAdmin…
Something we need to create the function to convert the number into string number with fast method, for example: 1000 to 1.0 k , 1000000 to 1.0 m , etc.…
I have started a long process through a terminal. Is it possible to make the Ubuntu terminal make a sound once the process is complete? This way, I don’t need…
This example below to setup default language code as id (Indonesian). Your file middleware.py And then in your settings.py
Rsync, which stands for “remote sync”, is a remote and local file synchronization tool. It uses an algorithm that minimizes the amount of data copied by only…
As you can see, if you using django-rest-framework, you will found many different response format. This middleware to solve all of these problems with Standard…
2019
1. Generate file .key and .csr Don’t miss to set Common Name as *.mydomain.com because we use GlobalSign Wildcard AlphaSSL . And the result of it,…
2016
Last year, we did a recap with what we thought were the best Python libraries of 2015 , which was widely shared within the Python community (see post in…
Map the given integer to a month. Example: For mo = 1 , the output should be getMonthName(mo) = "Jan" , For mo = 0 , the output should be…
Find the number of even digits in the given integer. Example For n = 1010 , the output should be numberOfEvenDigits(n) = 2 . For n = 123 , the output…
Given a string, return its encoding defined as follows: First, the string is divided into the least possible number of disjoint substrings consisting of…
Author Question: Argaen Code Fights Weekly has gained popularity in the past months and is receiving lots of fan letters. Unfortunately, some of the readers…
Author Question: Lepluto In Numberland, every integer living there has a soulmate which is the exact same number. To prevent family disasters, the…
Author Question: Giappi I have an integer number, which I want to reverse by following steps: Convert the number into binary string. Reverse binary…
Simply how to make a ciphertext only with 1 line. in this sample, the plaintext is result encoded from hexa. and then, just changing all integer 3 to 6 and…
Hello gays, this night i want to share my Python Crazy Decrypter tool. Python Crazy Decrypter is real crazy tool to decrypt md5, sha1, sha224, sha256, sha384,…
This javascript will validate/allow the number only when event key is pressed. For example result of it: tutorial above, when you can not directly add…
Setup Django in apache2 Raspberry Pi. Example in this configuration for monitoring the server raspberry pi using https://github.com/k3oni/pydash/ . As…
Adding BroadCast Mail to All User Registered in Django Admin. This is my last problem, we need custom default Django Admin to can submit BroadCast mail to All…
Example in this problem we need redirect the url http://localhost:8000/a/b/C/123/4/5/ to http://localhost:8000/abC12345 without / slash. 1. In your views.py…
1. Install module of Python Postmark Install this module manually from souce inside your environtment: https://github.com/themartorana/python-postmark…
For me I have to pass the –no-parent option, otherwise it will follow the link in the directory index on my site to the parent directory. So the command would…
Add this in your file of /etc/bash.bashrc , makesure you logged in as root.
This method simple but important. Example in your project dir is like this: Deleting the .pyc files one by one would be spending a lot of time. and you…
Add this configurations in your settings.py This configurations is if you work with smtp.gmail.com , other smtp is similiar with configurations. Unlock…
2013
SimplyGrey is a simple, easy to use theme for Jekyll that compromises of mainly grey colours. A lot of people enjoy the simplistic look of grey and also find…
Parsing JSON with Ruby is actually extremely easy. All you have to do is have the json gem installed ( gem install json ) and call the JSON.parse method on the…
You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different…