February 04, 2025 @ 11:34 PM UTC
It would be super sick to have a Mac app that allows you to map domain names to ports on the local machine. It would make local development when you have multiple backend servers so much easier. It would be pretty easy to build too—just a UI around /etc/hosts.
January 28, 2025 @ 03:29 AM UTC
// Convert a Uint8Array containing pcm_s16le data to a Float32Array containing // pcm_f32le data. function toFloat32Array(uint8Array: Uint8Array) { const dataView = new DataView(uint8Array.buffer); const float32Array = new Float32Array(uint8Array.length / 2); for (let i = 0; i < float32Array.length; i++) { const int16 = dataView.getInt16(i * 2, true); // Read little-endian int16 float32Array[i] = Math.max(-1, int16 / 32768.0); // Normalize to [-1.0, 1.0) } return float32Array; }
January 26, 2025 @ 09:58 AM UTC
Neat video on animating height to auto with just CSS, useful for accordions: https://www.youtube.com/watch?v=B_n4YONte5A
December 20, 2024 @ 03:27 AM UTC
Being able to implement traits on external types in Rust is super nice—wish you could do the same for interfaces in Go.
December 19, 2024 @ 02:48 PM UTC
Another great resource on organizing Go server code: https://grafana.com/blog/2024/02/09/how-i-write-http-services-in-go-after-13-years/
December 18, 2024 @ 01:01 PM UTC
The UX of native browser tooltips (using the `title` attribute) is so much better than fancy custom components that people build
December 17, 2024 @ 09:10 AM UTC
Next.js providers shared between components retain their value between navs
December 17, 2024 @ 09:10 AM UTC
An intuitive proof of the CAP theorem: https://mwhittaker.github.io/blog/an_illustrated_proof_of_the_cap_theorem/
December 17, 2024 @ 09:09 AM UTC
Security checks in API code should always live as close to the user as possible (such as in the route handler)—deeper code paths are often changed without consideration for security.
December 17, 2024 @ 09:08 AM UTC
Nice reference for organizing Go codebases: https://docs.gitea.com/contributing/guidelines-backend