This file contains 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAccessPointsForObjectLambda", | |
"s3:GetAccessPoint", | |
"s3:PutAccountPublicAccessBlock", |
This file contains 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
server { | |
#proxy_cache cache; | |
#proxy_cache_valid 200 1s; | |
listen 8080; | |
listen [::]:8080; | |
root /home/site/wwwroot/web; | |
index index.php index.html index.htm; | |
server_name example.com www.example.com; | |
port_in_redirect off; |
This file contains 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
<?php | |
// Create seven nodes, put them in a book tree structure. | |
// A | |
// |- B | |
// | |- C | |
// | |- D | |
// |- E | |
// |- F | |
// |- G |
This file contains 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
diff --git a/entityreference.devel_generate.inc b/entityreference.devel_generate.inc | |
index fab46dd..d6d7d78 100644 | |
--- a/entityreference.devel_generate.inc | |
+++ b/entityreference.devel_generate.inc | |
@@ -15,18 +15,20 @@ function entityreference_devel_generate($object, $field, $instance, $bundle) { | |
} | |
function _entityreference_devel_generate($object, $field, $instance, $bundle) { | |
- $object_field = array(); | |
- // Get all the entity that are referencable here. |
This file contains 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
<?php | |
/** | |
* @file | |
* File cleanup script, to be executed after the migration. | |
* | |
* Invocation: | |
* ddev drush scr web/modules/custom/server_migrate/file_cleanup.php . | |
*/ |
This file contains 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 python | |
''' | |
Send an multipart email with HTML and plain text alternatives. The message | |
should be constructed as a plain-text file of the following format: | |
From: Your Name <your@email.com> | |
To: Recipient One <recipient@to.com> | |
Subject: Your subject line | |
--- |
This file contains 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 | |
LANG=C | |
MINIMUM_REQUIRED_MEM=256 | |
FREE_MEM=$(free -mt | awk '/Total/{print $4}') | |
if [ $FREE_MEM -lt $MINIMUM_REQUIRED_MEM ]; then | |
TOP_PROCESS=$(ps aux --sort rss | tail -n1) | |
MESSAGE=$(echo "WARNING On $HOSTNAME, memory usage is low: $TOP_PROCESS WARNING" | sed 's/ /_/g') | |
# Post message |
This file contains 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 | |
# Parse df selected output | |
df -h|egrep -v 'File|tmpfs|docker|udev|snap|loop'| \ | |
while read LINE; do | |
USED_NUMBER=`echo $LINE |awk '{print $5}'|sed 's/\%//'|sed 's/ //g'` | |
USED_PERCENT=`echo $LINE |awk '{print $5}'|sed 's/ //g'` | |
MOUNT_POINT=`echo $LINE |awk '{print $6}'|sed 's/ //g'` | |
if [ $USED_NUMBER -gt 80 ]; then | |
# Create message without spaces |
This file contains 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
<?php | |
use Robo\Tasks; | |
/** | |
* Setup an ElasticSearch server locally. | |
*/ | |
class RoboFile extends Tasks { | |
const ES_VERSION = '7.5.2'; |
This file contains 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
<?php | |
use Robo\Tasks; | |
use Drupal\Core\DrupalKernel; | |
use Symfony\Component\HttpFoundation\Request; | |
$GLOBALS['drupal_autoloader'] = require_once 'web/autoload.php'; | |
/** |
NewerOlder