Needs the patch: https://www.drupal.org/node/1848686
Split "Administer vocabularies and terms" permission: Access the taxonomy overview page and Add terms in vocabulary name
File structure:
mymodule
|- src
Drupal.behaviors.mybehavior = { | |
attach: function (context, settings) { | |
$('#some_element', context).once('mybehavior', function () { | |
// Code here will only be applied to $('#some_element') | |
// a single time. | |
}); | |
} | |
}; |
<?php | |
/* | |
Plugin Name: Custom clear cache | |
Description: Clears out the custom cache code | |
Author: Tyler Fahey | |
Version: 1.0.0 | |
Author URI: https://tylerfahey.com | |
*/ | |
class CCC_CLI { |
/*------------------------------------*\ | |
breakpoint vars | |
\*------------------------------------*/ | |
$break-320: 20em; | |
$break-321: 20.0625em; | |
$break-480: 30em; | |
$break-600: 37.5em; | |
$break-768: 48em; | |
$break-980: 61.25em; | |
$break-1024: 64em; |
Needs the patch: https://www.drupal.org/node/1848686
Split "Administer vocabularies and terms" permission: Access the taxonomy overview page and Add terms in vocabulary name
File structure:
mymodule
|- src
- name: Install Apache | |
run: | | |
pwd | |
sudo apt update | |
sudo apt install apache2 | |
echo "GETTING ADMIN PERMS SETUP" | |
sudo adduser $(whoami) www-data | |
sudo adduser $(whoami) root |
cat hello.php | terminus remote:wp ${SITE}.${ENV} -- eval-file - |
SELECT table_name AS "Tables", engine AS "Engine", | |
-> round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
-> FROM information_schema.TABLES | |
-> WHERE table_schema = "pantheon" | |
-> ORDER BY (data_length + index_length) DESC; |
<?php | |
namespace Drupal\dropzonejs\Element; | |
use Drupal\Component\Utility\Bytes; | |
use Drupal\Component\Utility\Environment; | |
use Drupal\Component\Utility\Html; | |
use Drupal\Component\Utility\NestedArray; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Render\Element\FormElement; |
➜ echo "print_r( variable_get('mail_system'));" | terminus drush my-pantheon-site.dev -- php-script - | |
Array | |
( | |
[default-system] => DefaultMailSystem | |
[htmlmail] => HTMLMailSystem | |
) | |
[notice] Command: my-pantheon-site.dev -- drush php-script [Exit: 0] |
<?php | |
$deny = array("111.111.111", "222.222.222", "333.333.333"); | |
if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) { | |
header("location: https://example.com/"); | |
exit(); | |
} | |
?> |