How to read MySQL EXPLAINs
When you prepend the EXPLAIN keyword to the beginning of a query, it explains how the database executes that query and the estimated costs. By leveraging this internal MySQL tool, you can observe the following:
The ID of the query — The column always contains a number, which identifies the SELECT to which the row belongs.
The SELECT_TYPE — If you are running a SELECT, MySQL divides SELECT queries into simple and primary (complex) types, as described in the table below.
Storing OAuth tokens
I recently start working on a new SaaS app and I evaluate where to store auth token. I has always store them in cookie with HTTPOnly flag. Here, Dan walk us through the storage layer of an auth token. Dan is also author of letter to a news developer which you should subscribe if you haven’t
The Secret Life of fsync
We have heard that commodity ssd/hdd don’t provider durability such as a call to
fsync won’t flush data reliably and can suffering data loss in case of power failure. there is nothing the OS can do about it. enterprise grade drives had this capability with battery/capacitor. Lets find out those claims.
The Ultimate Guide to Image Optimisation
Image optimisation is often the first step in a person’s web performance and page speed journey. It’s a relatively easy fix with potentially high rewards. Optimising a single image isn’t complicated or time-consuming, and it could equate to site speed gains, better UX, and noticeably improved Core Web Vitals.
Anyone Can Play Guitar Series
This is a really fun experiment. Sonic Pi is software to make sounds and music driven by code. Sonic Pi comes with an IDE of sorts. But you can also control it from a CLI to make sound. Pair it with musical notes parser and now we can play song.
Hello Dolly: Democratizing the magic of ChatGPT with open models
We don’t usually list product announcement but I think this is worth to mention.
We all know and love ChatGPT from OpenAI. Since then, Meta released LlaMA together with the weight.
Stanford built the Alpaca model, which was based on LLaMA, but tuned on a small dataset of 50,000 human-like questions and answers that, surprisingly, made it exhibit ChatGPT-like interactivity.
Databricks’ show that, dolly-v1-6b, a large language model (blog post) trained on the Databricks machine learning platform, demonstrates that a two-years-old open source model can do.
It’s good experiment to play around with these models.
Code to read
A very compact representation of a placeholder for an image. Store it inline with your data and show it while the real image is loading for a smoother loading experience. It’s similar to BlurHash but with a few advanage
OpenAI API Ruby Client, Generate text with ChatGPT, transcribe and translate audio with Whisper, or create images with DALL·E…
A Ruby gem to transform HTML into PDFs, PNGs or JPEGs using Google Puppeteer/Chromium. I used it to generate invoice for my app.
The OpenAI Python library provides convenient access to the OpenAI API from applications written in the Python language.
one time password generation for JS eco system: browser, node, deno and bun
Pure Go Network Block Device(NBD) server and client library. NBD is a network protocol that can be used to forward a block device (typically a hard disk or partition) from one machine to a second machine. It is similar to how EC2 EBS works.
Postgres <> ChatGPT using PGX Rust to write PG extension. If you always want to write Postgres extension but don’t know where to start, and don’t want to write C, this is a very small repository that build on top of PGX, you can see how easy it is to write Postgres plugin with PGX in Rust, Everything is abstracted out. I picked this example because it involve dealing with external HTTP API, which is common in web dev, and also because it’s GPT :)
Command-line iCalendar (.ics) to CSV utility. Pure bash, no dependencies.
Pitchfork, Falcon, and Performant HTTP Servers - RUBY 587
It’s hard to imagine we’re still writing a new HTTP servers during this age but here we’re. the space is stillv very active with many optimization being done. This is a server to run Ruby app, but it always bring new knowledge generally. We will see how pre-forking helps save memory
A command-line tool that helps you summarize and pretty-print collaborators based on contributions
A web interface for chatting with Alpaca through llama.cpp. Fully dockerized, with an easy to use API.
when dealing with third part API, we may usually use the copy as CURL of chrome to export a CURL command to run. Paste cookie in terminal is tedious. Turning out we can get the cookie value through chrome remote debuggin protocol. This small script show a way to do so.
a tool for visualizing and analyzing Go execution traces. It is meant to be a faster, more accessible, and more powerful alternative to go tool trace
PostgreSQL pooler with sharding, load balancing and failover support.
a tool to sync Postgres database to a Snowflake, ClickHouse, or DuckDB warehouse. You can do a full sync once initially setup, then incremental later on.
That's it for this round, have a great day! If you like this newsletter, please tell the world, or
tweet about this