This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: example-site | |
recipe: drupal8 | |
config: | |
php: '7.4' | |
webroot: web | |
xdebug: true | |
tooling: | |
behat: | |
service: appserver | |
cmd: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before you can do this, get http://brew.sh/ | |
// Then get wget: brew install wget | |
// | |
// Grab an entire static archive of a site. (This might take a while) | |
wget -mkEpnp http://sitename.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run from /sites/default, etc. | |
tar \ | |
--exclude='files/private/backup_migrate'\ | |
--exclude='files/css' \ | |
--exclude='files/js' \ | |
--exclude='files/styles' \ | |
-zcvf files.tar.gz files/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MSG=$(head -n 1 $1) | |
PATTERN='[A-Z]+-[0-9]+: .' | |
# Allows us to read user input below, assigns stdin to keyboard | |
exec < /dev/tty | |
if [[ ! $MSG =~ $PATTERN ]]; then | |
echo 'Commit message does not match the format "ABC-123: i did some stuff".' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Looks for a JIRA style ticket name in the branch name, and prefixes the | |
# commit message with the ticket, if found. | |
# | |
# If you're using the `git commit -m` style commit command, the issue number | |
# will be prefixed without notice. | |
# | |
# If you use the standard `git commit` command where you're sent to an editor, | |
# the issue number will appear as the default commit message in the editor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
extensions: | |
Behat\MinkExtension: | |
base_url: https://mysite.local | |
goutte: | |
guzzle_parameters: | |
verify: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete local branches. | |
git branch --merged main | grep -v "\* main" | xargs -n 1 git branch -d | |
# Delete local branches (seems to remove only some). | |
git remote prune origin | |
# Delete remote branches (dry run). | |
git branch -r --merged origin/main | grep -v 'origin/main' | sed -E 's/(origin\/)//' | |
# Delete remote branches (for real). | |
git branch -r --merged origin/main | grep -v 'origin/main' | sed -E 's/(origin\/)//' | xargs -n 1 -I % git push origin :% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Grab args, shift first off as the timeout. | |
END=$((SECONDS+$1)) | |
shift | |
SERVICES=( $@ ) | |
# Wait for the services to report as healthy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DEPENDENCY_LOCATIONS=("./drush/Commands/contrib") | |
DEPENDENCY_LOCATIONS+=("./vendor") | |
DEPENDENCY_LOCATIONS+=("./web/libraries") | |
DEPENDENCY_LOCATIONS+=("./web/modules/contrib") | |
DEPENDENCY_LOCATIONS+=("./web/profiles/contrib") | |
DEPENDENCY_LOCATIONS+=("./web/themes/contrib") | |
for DEPENDENCY_LOCATION in "${DEPENDENCY_LOCATIONS[@]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set request blocking before any network activity | |
// No "clearing" is done at the end of the pass since blockUrlPatterns([]) will unset all if | |
// neccessary at the beginning of the next pass. | |
await passContext.driver.blockUrlPatterns(blockedUrls); | |
await passContext.driver.setExtraHTTPHeaders(passContext.settings.extraHeaders); | |
// Add this call for setting the cookie. | |
await passContext.driver.setCookie(); |