developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
63
results
Andrew Fletcher
•
If you're working with a large codebase in Visual Studio Code (VS Code) and need to find specific occurrences of a term, but only when it's a standalone word possibly surrounded by spaces or parentheses, regular expressions (regex) are your best friend. This guide will walk you through the steps to efficiently search for these instances, I'll be searching for the term 'SBT' and ensuring you don't pick up unwanted matches like `'ADSBTCR'` or `'SBT123'`.
Why use regular expressions?
Regular...
Andrew Fletcher
•
When working with code in Visual Studio Code, you may need to search for...
Andrew Fletcher
•
When working on Drupal projects, especially in a collaborative environment, it’s...
Andrew Fletcher
•
If you're working with Drupal on an Ubuntu 24.04 server, it's common to use the...
Andrew Fletcher
•
Maintaining a Drupal site is usually smooth sailing once the environment is...
Andrew Fletcher
•
If you’ve ever encountered strange errors while running a bash script, you’re not alone. Errors like : not found and Syntax error: end of file unexpected (expecting "then") can be particularly frustrating, especially when the script appears to be perfectly fine. This a situation that I had recently involving such errors and this article shows how I was able to resolve them, focusing on line endings and hidden characters.
Imagine you have a simple bash script designed to check and set the process...
Andrew Fletcher
•
Have you ever wanted to use Terminal with a more fluid style and increase your...
Andrew Fletcher
•
When it comes to text editing, Visual Studio Code (VS Code) is one of the most...
Andrew Fletcher
•
On a server directory with over 100,000 PDF files, I needed to verify the...
Andrew Fletcher
•
Managing large directories, especially those filled with a diverse mix of media...
Andrew Fletcher
•
Recently I came across this piece of gold when dealing with databases, particularly relational ones like MySQL, managing transactions efficiently is crucial to ensure data integrity and consistency. In MySQL, transactions are used to group several SQL commands into a single unit that either completely succeeds or completely fails, ensuring that a database remains in a consistent state.
Managing transactions efficiently in databases like MySQL is crucial for ensuring data integrity and...
Andrew Fletcher
•
In the realm of system administration and monitoring, understanding memory usage...
Andrew Fletcher
•
The red flag was when I saw the server disk space is showing a site is taking up...
Andrew Fletcher
•
To determine the size of a directory using the terminal, you can use the du...
Andrew Fletcher
•
Visual Studio Code (VS Code) allows you to manage extensions using the VS Code...