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
name: inst | |
recipe: pantheon | |
config: | |
framework: drupal8 | |
site: inst | |
id: a68cc9c7-e79f-4689-a3d8-6105d8a80fbf | |
services: | |
myservice: | |
type: redis | |
portforward: true |
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 | |
// All Pantheon Environments. | |
if (defined('PANTHEON_ENVIRONMENT')) { | |
// Drupal caching in development environments. | |
if (!in_array(PANTHEON_ENVIRONMENT, array('test', 'live'))) { | |
// Anonymous caching. | |
$conf['cache'] = 0; | |
// Block caching - disabled. | |
$conf['block_cache'] = 0; |
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 | |
# Exit on error | |
set -e | |
# This tool will: | |
# * Create a Directory to store the site environment logs | |
# * Download all the logs of a given site environment | |
# NOTE: You need to be a member of the site for this process to work |
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 | |
PANTHEON_GLOBAL_CDN=(23.185.0.1 23.185.0.2 23.185.0.3 23.185.0.4) | |
while IFS='' read -r l || [ -n "$l" ]; do | |
IP=`dig +short $l | grep '^[.0-9]*$'` | |
if [[ "${PANTHEON_GLOBAL_CDN[@]}" =~ $IP ]]; | |
then | |
echo "yes '$l'" >> CNAMEpointsToPantheon.txt ; | |
else | |
echo "no"; | |
fi |
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 | |
//Redirect /user and /admin pages for non-department IPs | |
function ip_in_list($ips) { | |
foreach(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']) as $check_ip) { | |
foreach($ips as $ip) { | |
if(FALSE !== strpos($check_ip, $ip)) { |
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
# Copy and self modified from ys.zsh-theme, the one of default themes in master repository | |
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background and the font Inconsolata. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# http://xiaofan.at | |
# 2 Jul 2015 - Xiaofan | |
# Machine name. | |
function box_name { |
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
# Prompt for the desired site UUID | |
echo Provide the desired site UUID, then press [ENTER]: | |
read SITE_UUID | |
for app_server in `dig +short appserver.live.$SITE_UUID.drush.in`; | |
do | |
mkdir $app_server | |
sftp -o Port=2222 live.$SITE_UUID@$app_server << ! | |
cd logs | |
lcd $app_server |
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 | |
# Prompt for the desired org UUID or name | |
echo Provide the desired org UUID or name, then press [ENTER]: | |
read PANTHEON_ORG | |
# Get a list of all sites in the org | |
PANTHEON_SITES="$(terminus org:site:list -n ${PANTHEON_ORG} --format=list --field=Name)" | |
# Name the CSV output file |
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
echo ORG: | |
read ORG | |
echo ENV: | |
read ENV | |
echo MODULE: | |
read MODULE | |
SITES=`terminus site:list --org=$ORG --format=list --field=name | sort` | |
for SITE in $SITES; do | |
echo "$SITE " | |
terminus drush $SITE.$ENV -- pml | grep $MODULE |
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 | |
terminus site:list --org="Org Name" --format=list > ./org_sites.txt | |
while IFS= read -r site; | |
do | |
terminus site:info "$site" --field name && terminus env:info "$site".live --field php_version | |
done < ./org_sites.txt |
NewerOlder