Skip to content

Instantly share code, notes, and snippets.

@lcatlett
lcatlett / README.md
Last active August 28, 2024 14:04
Enterprise Site Portfolio Deployments Scripting Library

Enterprise Many Site Deployment and Scripting Recommendations

This repository contains an example set of shell scripts that provide recommendations for Voya to execute CI / CD tasks at scale againt a large portfolio of Pantheon sites. Each script provided has inline docmentation for required functionality and additional examples of how to address common enterprise deployment challenges / requirements.

Features

  • Parallel execution of code and deployment tasks on multiple sites
  • Race condition handling for workflows, terminus commands, and git commands
  • Configuration of environment variables commonly required in enterprise deployment scripts
  • Automatic retries of failed site deployments
@kyletaylored
kyletaylored / pantheon-sql-perf.php
Last active November 1, 2024 02:48
Fix SQL_CALC_FOUND_ROWS performance degradation on WordPress, fix database indexes and primary keys.
<?php
/**
* Plugin Name: WordPress SQL Performance
* Plugin URI: https://www.pantheon.io
* Description: Fix SQL_CALC_FOUND_ROWS performance degradation.
* Author: Kyle Taylor, Pantheon
* Version: 1.0
* License: GPL2
* Credit: https://wpartisan.me/tutorials/wordpress-database-queries-speed-sql_calc_found_rows
@jtsternberg
jtsternberg / cmb2-number-field.php
Last active February 28, 2022 03:30
CMB2 Number Field
<?php
$cmb->add_field( array(
'name' => __( 'Postive numbers', 'theme-domain' ),
'desc' => __( 'Numbers only', 'msft-newscenter' ),
'id' => $prefix . 'number',
'type' => 'text',
'attributes' => array(
'type' => 'number',
'pattern' => '\d*',
@jakebellacera
jakebellacera / ICS.php
Last active October 11, 2024 10:58
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@redoPop
redoPop / .gitignore
Created June 18, 2010 22:08
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your