developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
495
results
Andrew Fletcher
•
When working with large prompt or configuration files (for example data/prompts-master.py), it’s common to copy or inspect the file in chunks using sed. Early on, this is easy to manage manually:
sed -n '1,324p' data/prompts-master.py
sed -n '325,647p' data/prompts-master.pyHowever, this approach breaks down as the file grows. If the file increases from 647 lines to 632, 976, or beyond, hard-coding line numbers becomes brittle and error-prone.
Let's walk through how to automatically calculate...
Andrew Fletcher
•
When working with Drupal environments, there are times you need to duplicate a...
Andrew Fletcher
•
Upgrading from Drupal 10.6.x to 11.3.x is officially supported, but in real...
Andrew Fletcher
•
Organisations are rushing to build internal AI tools that let teams query their...
Andrew Fletcher
•
Building a resilient web server
Early in the year, we encountered a...
Andrew Fletcher
•
Across every industry, the operational risks of cyber threats are escalating. Automated bots, denial-of-service attacks and vulnerability scanners are increasingly common. For businesses operating in Australia and globally, implementing resilient, proactive security measures is essential to ensure business continuity and protect customer trust.
One practical and highly effective strategy to strengthen server security is the deployment of dynamic threat blocking using lightweight, automated tools...
Andrew Fletcher
•
When working with Git, the .gitignore file plays a critical role in controlling...
Andrew Fletcher
•
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor...
Andrew Fletcher
•
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4...
Andrew Fletcher
•
Introduction
Data extraction and filtering are crucial for developers working...
Andrew Fletcher
•
Duplicate records in Drupal can cause significant issues, particularly when they lead to integrity constraint violations in the database. These errors often occur due to duplicate UUIDs in the `node` table, which can result from programmatic imports, migrations, or unintended database inconsistencies. This guide provides a structured approach to identifying and resolving duplicate records in Drupal.
Identifying duplicate records
Before attempting to delete or update any records,...
Andrew Fletcher
•
When working on Drupal migrations, developers often assume that adding a new...
Andrew Fletcher
•
When deploying a Python project from a User Acceptance Testing (UAT) environment...
Andrew Fletcher
•
The Drupal theme configuration has undergone recent changes made to the Webpack...
Andrew Fletcher
•
Accessibility is a fundamental aspect that ensures experiences are inclusive for...