I encounter an issue where I don't have local composer installed but I need to run one. Solution is to run it on the fly from docker container: 1docker run --rm --interactive --tty --volume <directory_path_to_your_composer.json>:/app composer install
Read MoreUsing the example in variable assignment And you want to do something to each variable, you may do the following: 1foreach ($i in $container_ids) { 2$i 3} So for instance, you want to delete all the containers: 1foreach ($i in $container_ids) { 2docker rm $i 3}
Read MoreFrom powershell CLI; 1$container_ids=docker ps -qa 2$container_ids In the command above, 1st line does the assignment. 2nd line prints the values. You will then have an output such as the following: 16fc00bc6a 2ba3c76ca3 3a9b4e46eb
Read More
It's quite annoying when you committed large files to git specially if it's something that's something confidential. We'll relatively easy to do that. Just use the 'filter-branch' command in git as follows: 1git filter-branch --force --index-filter \ 2> 'git rm --cached --ignore-unmatch …
Read MoreUse the command: 1~$ drush pml --no-core --status=Enabled See sample below: 1~$ drush pml --no-core --status=Enabled 2----------------------------- ----------------------------------------------------------- --------- ----------------- 3Package Name Status Version 4----------------------------- …
Read MoreIf you see an error such as this: 1ERROR! 'sudo' is not a valid attribute for a Play You need to replace: 1sudo: yes with 1become:true See https://stackoverflow.com/questions/60162859/error-sudo-is-not-a-valid-attribute-for-a-play
Read MoreWhen you're doing development, most of the time, you don't want to minify css/js. Here's how you the respective settings: settings.local.php (drupal 7) 1$conf['preprocess_css'] = FALSE; 2$conf['preprocess_js'] = FALSE; settings.local.php (drupal 8 & 9) …
Read More
From the example in https://docs.github.com/en/rest/reference/pulls#create-a-pull-request, it seems quite easy: 1curl \ 2-X POST \ 3-H "Accept: application/vnd.github.v3+json" \ 4https://api.github.com/repos/octocat/hello-world/pulls \ 5-d …
Read MoreThe following modules are needed: 1drush en site_audit -y 2drush en hacked -y 3drush en diff -y 4drush en seo_checklist -y 5drush en security_review -y 6drush en unused_modules -y All of the resulting reports will be in Admin > Reports. Exception is "Unused Modules" where you need to go to Admin > …
Read MoreIf you are seeing this error: 1~# nmap -Pn www.example.org 2Starting Nmap 7.80 ( https://nmap.org ) at 2020-09-04 20:59 UTC 3Couldn't open a raw socket. Error: Permission denied (13) Most probably, installation was through Ubuntu's snap as follows: 1~# snap install nmap 2nmap 7.80 from Maximiliano Bertacchini …
Read More