makandra dev

When an LLM model has vision capabilities, you can attach Base64-encoded images to chat messages and it will load...

When testing Ollama vision requests with VCR, the recorded cassettes will contain the full base64-encoded image payloads. A single...

I find it annoying to iterate on a spec that relies on a recorded VCR casette. You constantly have to...

It's quite frustrating to come back to a coding agent after a while only to see that it needed...

I recently encountered this error as I was trying to build assets: $ node esbuild.config.js .../node_modules/esbuild-plugin-browserslist/dist/resolveToEsbuildTarget.js:43 throw new Error('Could...

makandra dev

Postgres supports multiple built-in range datatypes: int4range int8range numrange tsrange (range with timestamp without timezone) tstzrange (range with timestamp...

You may remember to use the || operator with caution to set defaults. We'll see that && and other conditionals come...

TypeScript basically uses structural typing, which is conceptually quite similar to duck typing, but with static compile-time type checking...

Knapsack allows you to rerun a specific job locally. This is helpful to run specs in the exactly same order...

The :test adapter doesn't respect limits_concurrency configuration. Switch to :solid_queue adapter in your test to verify blocking...

unpoly.com

Quick guide for frequently used compiler selector patterns of Unpoly. 1. BEM Component Pattern When: Reusable UI components with multiple...

There's a method Integer() defined on Kernel, that typecasts everything into an Integer. Integer("2") # 2 Integer("foo") # Invalid...

RSpec examples can get quite long, especially in feature specs. This makes them hard to read & understand. Also, when executing...

Modern CSS offers the field-sizing property to allow elements to automatically adjust size (width and/or height) to fit their...

The DB schema is the most important source of truth for your application and should be very self-explanatory. If...

Even if you don't make any beginner mistakes like N+1 queries or missing DB indices, some requests can...

developer.mozilla.org

Here is a workaround for when you want to use text-wrap: balance but must also render nicely for browsers...

There are several ways to run a single spec. I usually copy the spec file path with the line number...

The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...

Here is a bash script that I use to auto-configure displays on Ubuntu 24.04 with Xorg. Background

Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...

In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...

masilotti.com

Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...

This talk shows simple and advanced usages of the ruby/debug debugger. It goes through a step by step debugging workflow...