Install Drush - a command-line shell and Unix scripting interface for Drupal.
Place file script.php
under the Drupal root directory:
<?php
Install Drush - a command-line shell and Unix scripting interface for Drupal.
Place file script.php
under the Drupal root directory:
<?php
Wanted to be able to debug some Elasticsearch-related issues or cases within the production environment. To make this work, you need to ignore the invalid SSL certificate and adjust the Elasticsearch cluster index name, that usually tied to the database name.
Suppose you already have an EC2 instance running in the same VPC as your Elasticsearch cluster and that instance security group allows access to the Elasticsearch cluster.
# There's a lack of sample code for acme/Let's Encrypt out there, and | |
# this is an attempt to at least slightly remedy that. It's the result | |
# of my first day's hacking on this stuff, so almost certainly contains | |
# errors and oversights. | |
# | |
# It's not designed to be specifically useful if what you want is | |
# just a cert -- certbot or dehydrated are better for that. It is sample | |
# code for people who are building automated systems to deal with large | |
# numbers of Let's Encrypt certificates to play with. | |
# |
server { | |
listen 443 ssl; | |
server_name kibana.domain.com; | |
rewrite ^/$ https://$host/_plugin/kibana redirect; | |
ssl_certificate /etc/nginx/cert.crt; | |
ssl_certificate_key /etc/nginx/cert.key; | |
ssl_session_cache builtin:1000 shared:SSL:10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
2020-05-06T10:17:35Z I! will use file based credentials provider | |
2020-05-06T10:17:35Z I! cloudwatch: publish with ForceFlushInterval: 1m0s, Publish Jitter: 37s | |
2020-05-06T10:17:35Z I! Starting AmazonCloudWatchAgent (version 1.237768.0) | |
2020-05-06T10:17:35Z I! Loaded outputs: cloudwatch cloudwatchlogs | |
2020-05-06T10:17:35Z I! Loaded inputs: tail cpu diskio processes statsd swap disk mem netstat socket_listener | |
2020-05-06T10:17:35Z I! Tags enabled: host=ip-X-X-X-X | |
2020-05-06T10:17:35Z I! Agent Config: Interval:1m0s, Quiet:false, Hostname:"ip-X-X-X-X", Flush Interval:1s | |
2020-05-06T10:17:35Z I! Started the statsd service on :8125 | |
2020-05-06T10:17:35Z I! Statsd listener listening on: [::]:8125 | |
2020-05-06T10:17:35Z I! will use file based credentials provider |
<?php | |
namespace Drupal\example_pantheon_loader; | |
use Drupal\Core\Database\Connection; | |
use Drupal\batch_service_interface\AbstractBatchService; | |
use Drupal\Core\Logger\LoggerChannelFactoryInterface; | |
use Drupal\Core\StringTranslation\TranslationInterface; | |
use Drupal\file\Entity\File; | |
use Drupal\Core\File\FileSystem; |
<?php | |
use Drupal\views\ViewExecutable; | |
use Drupal\views\Plugin\views\query\QueryPluginBase; | |
/** | |
* Implementation of hook_views_query_alter | |
* @param type $view | |
* @param type $query |
<?php | |
/** | |
* Debugging using the database connection. | |
*/ | |
/** @var \Drupal\Core\Database\Connection */ | |
$connection = \Drupal::service('database'); | |
$query = $connection->select('node', 'node'); | |
$query->fields('node', ['nid']) |
// Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e | |
// by @levelsio | |
// HOW TO | |
// 1) Make a Google Sheet, we'll pull the first cell e.g. A1 | |
// 2) Publish your Google Sheet, File -> Publish To Web | |
// 3) Copy the SHEET_ID in the URL, put it in here below: | |
const endpoint = "https://spreadsheets.google.com/feeds/cells/SHEET_ID/1/public/full?alt=json" | |
// 4) Install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188 | |
// 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc) |