Skip to content

Instantly share code, notes, and snippets.

View kyletaylored's full-sized avatar
🍝
unfurling wet spaghetti

Kyle Taylor kyletaylored

🍝
unfurling wet spaghetti
View GitHub Profile
@kyletaylored
kyletaylored / README.md
Last active September 23, 2025 20:18
Azure VM on Datadog Example (Bicep)

Datadog Demo VM (Azure B1s)

This template deploys a minimal Ubuntu 22.04 VM (B1s) that:

  • Installs Nginx with a demo HTML page
  • Installs the Datadog Agent via VM Extension
  • Opens ports 22 (SSH) and 80 (HTTP)

One-Click Deploy

Deploy to Azure

# ---------- Azure OpenAI ----------
# Your Azure OpenAI resource endpoint (include trailing slash)
AZURE_OPENAI_ENDPOINT=https://<your-resource>.openai.azure.com/
# Your Azure OpenAI API key
AZURE_OPENAI_API_KEY=<your-azure-openai-key>
# The API version compatible with your deployment
AZURE_OPENAI_API_VERSION=2024-10-21
# Your deployment name (e.g., gpt-4o-mini, gpt-4o-mini-2024-07-18, etc.)
AZURE_OPENAI_DEPLOYMENT=gpt-4o-mini
@kyletaylored
kyletaylored / Query Azure Log Data
Last active May 19, 2025 15:40
Query Azure Log Data
.
@kyletaylored
kyletaylored / datadog_install.sh
Last active September 3, 2024 18:46 — forked from collin-sanford/datadog_install.sh
Datadog Install for Linux
#!/bin/bash
#######################################
# Datadog Agent Installation Script
#######################################
#
# Description:
# This script automates the installation and configuration of the Datadog Agent
# on Linux systems. It validates the API key, automatically detects the correct
# site, and configures various Datadog features.
@kyletaylored
kyletaylored / nginx-log-parser.php
Created October 2, 2023 17:51
Nginx Log Parser WordPress Plugin
<?php
/**
* Plugin Name: Nginx Log Parser
* Description: Parses Nginx logs for query parameter insights.
* Version: 1.0
* Author: Kyle Taylor
* Author URI: https://pantheon.io
*/
if (!class_exists('WP_List_Table')) {
@kyletaylored
kyletaylored / bfi_thumb.php
Created September 26, 2023 16:29
Fix bfi_thumb.php for Pantheon directories
<?php
// Create the upload subdirectory, this is where
// we store all our generated images
if ( defined( 'BFITHUMB_UPLOAD_DIR' ) ) {
$upload_dir .= "/" . BFITHUMB_UPLOAD_DIR;
$upload_url .= "/" . BFITHUMB_UPLOAD_DIR;
} else {
$upload_dir .= "/bfi_thumb";
$upload_url .= "/bfi_thumb";
@kyletaylored
kyletaylored / .gitignore
Last active August 9, 2023 15:27
IP analysis script
node_modules
*.csv
package-lock.json
@kyletaylored
kyletaylored / .puppeteerrc.cjs
Created June 29, 2023 19:53
Install Chrome into Pantheon Appserver using PHP and NodeJS
const { join } = require("path");
/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, ".cache", "puppeteer"),
};
@kyletaylored
kyletaylored / cachetool-check.sh
Created May 17, 2023 19:20
A one-liner for checking opcache information using cachetool and WP CLI or Drush.
(wp|drush) eval '$cachetool=sys_get_temp_dir()."/cachetool.phar";$old="https://gordalina.github.io/cachetool/downloads/cachetool-3.2.2.phar";$new="https://github.com/gordalina/cachetool/releases/download/8.5.0/cachetool.phar";$url=(version_compare(phpversion(), "8") < 0) ? $old : $new;file_put_contents($cachetool, file_get_contents($url));chmod($cachetool, 0755);echo shell_exec("php $cachetool opcache:status --fcgi=/shared-run/php-fpm.sock");unlink($cachetool);'
@kyletaylored
kyletaylored / .lando.yml
Created March 4, 2023 01:59
Lando example config with PHP override and multiple databases
name: example
recipe: pantheon
config:
framework: drupal8
site: example
id: <SITE_UUID>
xdebug: true
php: 8.1
index: false
edge: false