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
119
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
•
In today's security-conscious world, enforcing HTTPS on your web applications is...
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
•
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
•
If you've ever worked in a cross-platform development environment, you've likely...
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
•
To review the content of files being generated in the /tmp directory on an Ubuntu server before Microsoft Defender removes them, you can use several approaches. Following is the approach we took.
Real-Time Monitoring
You can set up a script to monitor the /tmp directory and log the contents of new files. Use inotifywait to watch for new files and then copy them to another directory for review.
Install inotify-tools:
sudo apt-get install inotify-toolsCreate a monitoring...
Andrew Fletcher
•
Managing large directories, especially those filled with a diverse mix of media...
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
•
Continuing on from the Drupal 9 to Drupal 10 upgrade outline written...