curl -LSs http://drupalconsole.com/installer | php
mv console.phar /usr/local/bin/drupal
<?php | |
function phpunit --description "wrap phpunit with the needed env vars" | |
set -g -x SIMPLETEST_DB 'mysql://root@localhost/dev_d8' | |
set -g -x SIMPLETEST_BASE_URL 'http://d8.dev' | |
command phpunit $argv | |
end |
#! /usr/bin/env bash | |
# Variables | |
APPENV=local | |
DBHOST=localhost | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASSWD=test123 | |
echo -e "\n--- Mkay, installing now... ---\n" |
<?php | |
/** | |
* @file mymodule.install | |
* Install hooks for mymodule. | |
*/ | |
/** | |
* Description of what the database update does. Do not use "Implements..." since it adds | |
* zero information and makes reading the list of pending database updates in Drush harder | |
* to read. |
<?php | |
$file = system_retrieve_file($remote_file_url); | |
$node->field_image[$node->language][] = (array) $file; | |
node_save($node); |
#!/bin/bash | |
docker stop `docker ps -aq` | |
docker rm `docker ps -aq` | |
docker rmi `docker images -aq` |
<?php | |
/** | |
* Implement of drush_hook_COMMAND_validate(). | |
* | |
* Prevent catastrophic sql-sync to live. Note that this file has to be local to the | |
* machine that intitiates sql-sync command. | |
*/ | |
function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) { | |
if (strstr($destination, '.prod')) { |
Things to sort out before arriving to DrupalCamp Spain 2014: