This file contains hidden or 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 bash | |
# Adjust as needed to run desired migration in desired multidev. | |
SITE_ID=[site_env] | |
MIGRATION=[migration_id`] | |
CONTINUE=0 | |
while [ $CONTINUE -eq 0 ] | |
do | |
echo "Running migration command..." |
This file contains hidden or 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 Symfony\Component\Config\FileLocator; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | |
// Build the container. | |
$container = new ContainerBuilder(); | |
$loader = new YamlFileLoader($container, new FileLocator(__DIR__)); | |
$loader->load('services.yml'); |
This file contains hidden or 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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', TRUE); | |
ini_set('display_startup_errors', TRUE); |
This file contains hidden or 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 | |
/** @var \Drupal\Core\Config\StorageInterface $config_storage */ | |
$config_storage = \Drupal::service('config.storage'); | |
$path = drupal_get_path('module', 'module_name') . '/config/install'; | |
$file_storage = new \Drupal\Core\Config\FileStorage($path); | |
$id = 'full.config.identifier'; | |
$config_storage->write($id, $file_storage->read($id)); |
This file contains hidden or 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
# Run one time, value must match value xdebug.idekey in the PHP config. | |
export XDEBUG_CONFIG="idekey=123" | |
export PHP_IDE_CONFIG="serverName=example.local" | |
# Toggle to enable/disable Xdebug. | |
export XDEBUG_CONFIG="remote_enable=1" |
This file contains hidden or 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 bash | |
# USE NVM instead https://github.com/nvm-sh/nvm. | |
set -e | |
cd /tmp | |
curl -O https://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.xz | |
tar xf node-v10.15.1-linux-x64.tar.xz |
This file contains hidden or 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/bash | |
sudo mkdir -p /opt/box | |
cd /opt/box | |
sudo curl -OL https://github.com/humbug/box/releases/download/3.4.0/box.phar | |
sudo chmod +x box.phar | |
sudo mv box.phar box-3.4.0.phar | |
sudo update-alternatives --install /usr/bin/box box /opt/box/box-3.4.0.phar 10 | |
This file contains hidden or 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
# https://pantheon.io/docs/rsync-and-sftp/ | |
# $ENV is dev/test/live or multidev | |
# $SITE is UUID | |
# Ran from the 'sites/default' directory (or applicable site directory). | |
rsync -rvlz \ | |
--copy-unsafe-links \ | |
--size-only \ | |
--ipv4 \ |
This file contains hidden or 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
certbot certonly --manual --preferred-challenges dns --manual-public-ip-logging-ok -d '*.domain.com' -d domain.com | |
# update TXT records for authentication | |
sudo service apache2 reload |
This file contains hidden or 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
certbot certonly --manual --preferred-challenges dns --manual-public-ip-logging-ok -d '*.domain.com' -d domain.com | |
# update TXT records for authentication | |
sudo service apache2 reload |