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
98
results
Andrew Fletcher
•
How to set the Private file path in Drupal using the following steps:
Create a private folder in the web root
Add a .htaccess file to the private folder
Update the settings.php file
Create a private folder in the web root
Open a terminal window and navigate to the web root directory of your Drupal site. In your web root add your private folder. In this instance I'll create a folder named 'prvt-media'. Use the mkdir command to create a new folder named prvt-media
mkdir...
Andrew Fletcher
•
This page will be a progressive outline of moving those regular run scripts that...
Andrew Fletcher
•
This issue
I have a folder with about 10,000 files in it. I want to scan...
Andrew Fletcher
•
Using Homebrew for speed tests...
I'm using Speediest CLI - for more details go...
Andrew Fletcher
•
I'm in an environment where the default branch is staging and I'm attempting to...
Andrew Fletcher
•
How to count the number of files in a directory. At some point you'll have a directory or directories that you need to know the number of files in them. On Linux, the list command (ls) is piped with the wc -l command.
ls | wc -lThis command works great if all the files are located in one directory. What about if you have multiple directories. Then you will need to use the find command piped with the wc command
find <directory> -type f | wc -lThis command only...
Andrew Fletcher
•
I've recently upgraded the server Ubuntu 20.04 updating the PHP version from 7.4...
Andrew Fletcher
•
Find by file name
To perform a find command in terminal use
find / -name...
Andrew Fletcher
•
I had generated a backup of key directories on the server - see Create a...
Andrew Fletcher
•
An approach to generating a backup server is using a shell script. A...
Andrew Fletcher
•
Creating a bash script
Bash scripts are files containing code that tell your computer to do something. In this instance, I want to rename a batch files in a directory. Such as changing:
37351001 - BlueSpotted.jpg
37351008 -SpangledEmporer _ 0133A.jpg
37353003 -Black-Bream_3481 .jpg
37353004 -35 - Yellowfin.jpgInstead having these files appear as:
37351001.jpg
37351008.jpg
37353003.jpg
37353004.jpgHowever, I don't have four files. Wouldn't be worth my time...
Andrew Fletcher
•
JSON structure
Outlining the structure of the elements common attributes:...
Andrew Fletcher
•
How do you generate a .pem file from an existing .ppk key?
Is putty on your...
Andrew Fletcher
•
In this woalk through I am going to use GitHub. However, the steps are...
Andrew Fletcher
•
In terminal I ran a regular command - compose update. Something I've...