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 | |
# just a quick script i wrote to meet need to sometimes blind update a site with zero code review/testing :( but :) | |
# sometimes steps must be delayed due to pantheon not responding right away without a little delay in script timing (like committing and then immediately pushing) | |
# Jason Lancaster jlancaster@lmdagency.com | |
DELAY=10 | |
function sleepme() { | |
echo "### sleeping for $DELAY seconds ###" | |
sleep $DELAY | |
} |
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 | |
# exec on cmd line running ./check-all-pantheon-sites.sh | |
# | |
# Script will run through terminus output for pantheon live sites you access to and | |
# will report on modules requiring security updates. The awk process in each ends up | |
# limiting output to only things that require security updates. | |
# | |
# This is the kind of script that could email you nightly or you can just run when | |
# you perform routine updates. If emailing, you'd want to suppress output for sites | |
# that don't have any updates so that's TBD if we work on this more. |
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
// Redirect user/admin pages to dev site while we are in active dev | |
/* | |
if (( | |
$_ENV['PANTHEON_ENVIRONMENT'] === 'live' || | |
$_ENV['PANTHEON_ENVIRONMENT'] === 'test' | |
) && ( | |
(strpos($_SERVER['REQUEST_URI'], '/user') !== false) || | |
(strpos($_SERVER['REQUEST_URI'], '/admin') !== false) | |
)) { | |
echo 'https://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
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
// ---------------------------------------- | |
// Find all YouTube and Vimeo videos | |
var $allVideos = $(“iframe[src*=’www.youtube.com'], iframe[src*=‘player.vimeo.com’]“); | |
// Figure out and save aspect ratio for each video | |
$allVideos.each(function() { | |
$(this) | |
.data(‘aspectRatio’, this.height / this.width) | |
// and remove the hard coded width/height | |
.removeAttr(‘height’) |
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
terminus remote:wp journalism.dev -- plugin update --all |