Type sudo visudo -f /etc/sudoers.d/30-brew
and enter the following content:
%admin ALL = (ALL) NOPASSWD: /usr/local/bin/brew
<?php | |
file_put_contents('public://screenshot.jpg', $this->getSession()->getScreenshot()); | |
file_put_contents('public://' . drupal_basename($this->getSession()->getCurrentUrl()) . '.html', $this->getCurrentPageContent()); |
Type sudo visudo -f /etc/sudoers.d/30-brew
and enter the following content:
%admin ALL = (ALL) NOPASSWD: /usr/local/bin/brew
#/bin/bash | |
du -cks * | sort -rn | head |
# Get the config as yaml first. | |
drush config:get search_api.index.acquia_search_index datasource_settings.entity:node.bundles.selected > config-overrides.yml | |
# Make modifications to config-overrides.yml. | |
cat config-overrides.yml | drush config:set search_api.index.acquia_search_index datasource_settings.entity:node.bundles.selected - --input-format=yaml |
#!/usr/bin/env bash | |
# Create an admin user. | |
wp user create username user@example.com --role=administrator | |
# Reset user password. | |
wp user update user --user_pass=password --skip-email | |
# Create a database backup. | |
wp db export - | gzip -9 > db.sql.gz |
# PHPUnit testing. | |
# Set `BROWSERTEST_OUTPUT_DIRECTORY` so we get the browser output. | |
(export BROWSERTEST_OUTPUT_DIRECTORY=$(pwd)/docroot/sites/simpletest/browser_output; blt tests:phpunit:run -vvv) | |
# Behat testing. | |
(export BUILDKITE_BUILD_CHECKOUT_PATH=$(pwd); blt tests:behat:run --environment=ci --no-interaction --yes --ansi --define drush.alias='${drush.aliases.ci}') |
This script aims to address the error that often appear when running Drupal cron jobs, for temporary files that have an entry in the database but not actually existing in the file system:
[error] Could not delete temporary file "public://example_file.pdf" during garbage collection
It can be run to get a count of the files:
drush scr /path/to/remove-missing-files.php
UPDATE ixs_options | |
SET option_value = 'http://localhost:8080' | |
WHERE option_name = 'home'; | |
UPDATE ixs_options | |
SET option_value = 'http://localhost:8080' | |
WHERE option_name = 'siteurl'; | |
UPDATE ixs_posts | |
SET post_content = REPLACE(post_content,'http://old.url','http://localhost:8080'); |
#!/usr/bin/env python | |
import sys | |
import boto3 | |
import os | |
def get_lambda_last_commit(arn): | |
"""Get the commit hash of the last lambda push. | |
Keyword arguments: |