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
•
This issue
I have a folder with about 10,000 files in it. I want to scan through the directories and isolate files that are different from what sits in the database. How do you generate a list of file names of all the files into a single txt file?
Solution
One option is using the list command
ls > filename-list.txtHowever, this option will generate a list of the current directory, listing directories by name only and therefore not including file from each of the directories...
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
•
This guide has been compiled as a reference tool on how to access field values...
Andrew Fletcher
•
How to count the number of files in a directory. At some point you'll have...
Andrew Fletcher
•
I've recently upgraded the server Ubuntu 20.04 updating the PHP version from 7.4 to 8.1. However, when I've attempted to export the MySQL database using the command
drush sql-dump --extra-dump=--no-tablespaces --result-file=../sql/db-2023-02-25.sqlI seeing the following response
> mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD or FLUSH_TABLES privilege(s) for this operation (1227)
In SqlCommands.php line 242:
Unable to dump...
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...
Andrew Fletcher
•
How do you generate a .pem file from an existing .ppk key?
Is putty on your mac?
Check by running the command
puttygen -VWhich will generate a response similar to
puttygen: Release 0.76
Build platform: 64-bit Unix
Compiler: clang 12.0.5 (clang-1205.0.22.9)
Source commit: 1fd7baa7344bb....Don't have Putty, well easily fixed with homebrew.
brew install putty
Generate the key
We will use puttygen to generate the key.
puttygen key.ppk -O private-openssh -o key.pem
key.ppk
the...
Andrew Fletcher
•
In this woalk through I am going to use GitHub. However, the steps are...
Andrew Fletcher
•
Do you want to know how to add a node alias in a twig file? Rather than do...
Andrew Fletcher
•
The cache system in Drupal 9 delivers the API with the elements required for...
Andrew Fletcher
•
Installing Varnish to increase the speed of the page load.
Install varnish using...