Skip to content

Instantly share code, notes, and snippets.

View ccharlton's full-sized avatar
🎯
Focusing

Chris Charlton ccharlton

🎯
Focusing
View GitHub Profile
@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
@ccharlton
ccharlton / newrelic-nrql-labeled-http-status-codes
Created June 14, 2024 20:51
New Relic (NRQL) query with labeled HTTP Status Codes
SELECT count(http.statusCode)
FROM Transaction
WHERE appName = {{appName}}
FACET CASES(
WHERE http.statusCode = 100 AS '100 Continue',
WHERE http.statusCode = 101 AS '101 Switching Protocols',
WHERE http.statusCode = 102 AS '102 Processing',
WHERE http.statusCode = 103 AS '103 Early Hints',
WHERE http.statusCode >= 104 AND http.statusCode <= 199 AS '104-199 Unassigned',
WHERE http.statusCode = 200 AS '200 OK',
@kyletaylored
kyletaylored / composer.json
Last active April 19, 2023 14:53
How to integrate Monolog with New Relic in Drupal 9
{
"require": {
"drupal/monolog": "^2.2",
"newrelic/monolog-enricher": "^2.0"
}
}
@lukecav
lukecav / wp-config.php
Created October 25, 2021 16:39
Exclude options data from being caching in Redis using the Redis Object Cache plugin
define( 'WP_REDIS_IGNORED_GROUPS', [ 'options' ]);
import React from "react";
import { Link } from "react-router-dom";
export function createResource(getPromise) {
let cache = {};
let inflight = {};
let errors = {};
function load(key) {
inflight[key] = getPromise(key)
@erik-pantheon
erik-pantheon / gist:37c35d4cebad6a0eaf08
Created January 28, 2016 15:43
rsync on pantheon
ENV='ENV'
SITE='SITEID'
read -sp "Your Pantheon Password: " PASSWORD
if [[ -z "$PASSWORD" ]]; then
echo "Woops, need password"
exit
fi
while [ 1 ]
@rjorgenson
rjorgenson / README.md
Last active July 18, 2024 08:31 — forked from agnoster/README.md
My ZSH Theme

agnoster.zsh-theme

forked by rjorgenson

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
  • NVM
  • RVM
@swichers
swichers / add-mtime-file-url.php
Created June 19, 2015 23:43
Add mtime to files in Drupal
<?php
/**
* Implements hook_file_url_alter().
*/
function HOOK_file_url_alter(&$uri) {
// Client is complaining about images not refreshing immediately when the user
// changes one image for another (and the filename stays the same). Using the
// image path flush function doesn't trigger a browser cache refresh for the
@terrehbyte
terrehbyte / UsefulUnityAssets.md
Last active June 24, 2024 19:06
Useful Open-Source Unity Assets

Useful Open-Source Unity Assets

This is a compilation of various open-source Unity plugins, codebases, or utility scripts that may aid in expediting the development process.

Art / Design Tools

ProbePolisher - Light Probe Editor - keijiro

"ProbePolisher is a Unity Editor plugin for editing light probes. It works both on Unity Basic (free) and Unity Pro."

Code
Releases

@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);