Skip to content

Instantly share code, notes, and snippets.

@dustinleblanc
dustinleblanc / .lando.yml
Last active September 1, 2021 19:15
Pantheon Build Tools with Lando Behat Testing
name: some-site
recipe: pantheon
config:
framework: drupal8
env: dev
site: some-site
id: some-uuid-string-here
drush: 8.3
php: '7.3'
webroot: web
@Schnitzel
Schnitzel / attacks.md
Last active April 16, 2018 19:40
Drupal SA-CORE-2018-002 attacks

Drupal SA-CORE-2018-002 attacks on amazee.io

Attack 1

First seen: April 13th 2018, 12:54:06

Array Key: #markup

Array Value:

@greg-1-anderson
greg-1-anderson / lock-all-environments
Last active November 12, 2021 20:52
Lock all of the environments for the given site, save for the live environment
#!/bin/bash
SITE=$1
USER=${2-demo}
PASSWORD=${3-secretsecret}
ALL_ENVS="$(terminus env:list $SITE --field=id | grep -v live)"
for ENV in $ALL_ENVS ; do
is_locked="$(terminus lock:info "$SITE.$ENV" --field=locked)"
@johnennewdeeson
johnennewdeeson / mymodule.install
Created September 2, 2015 10:21
Rebuild all content node access permissions in an update hook
/**
* Rebuild node access permissions.
* node_access_rebuild(TRUE) claims to be able to do this in batch mode but all it does is set a
* batch. There is no way to process the batch from within an update hook. You could do it using
* a separate drush command but if you only have access to run updb on your production env
* then you need to do all the processing from within the update hook. This gem allows complete
* safe permission rebuild, batched, from within a single update hook.
*/
function mymodule_update_7001(&$sandbox) {
_node_access_rebuild_batch_operation($sandbox);