Skip to content

Instantly share code, notes, and snippets.

View lukecav's full-sized avatar
🤔
If we're kind and polite, the world will be right.

Luke Cavanagh lukecav

🤔
If we're kind and polite, the world will be right.
View GitHub Profile
@jack-arturo
jack-arturo / claude-automation-cron-setup.md
Created August 22, 2025 04:23
Complete macOS Setup Guide for Claude Automation Hub

Complete macOS Setup Guide for Claude Automation Hub

Step 1: Install Claude Desktop & Claude Code

# Install Claude Desktop (if not already installed)
# Download from: https://claude.ai/download

# Install Claude Code via Homebrew (when available)
# Note: As of now, check if Claude Code is released
@vlaaad
vlaaad / _Defold_MCP.md
Last active August 26, 2025 08:30
Defold MCP server

Steps to try it out:

  1. Add mcp.editor_script to a Defold project
  2. Project -> Reload Editor Scripts
  3. It will print something like MCP running on http://localhost:50489/mcp — your port will be different
  4. Ensure that npx mcp-remote http://localhost:50489/mcp --transport http-only successfully runs in your terminal.
  5. Edit Claude desktop config to refer to the server (see claude_desktop_config.json for reference)
  6. Restart Claude and enjoy!
<?php
/**
* Vary LCP Image Optimizations WordPress Plugin.
*
* @package VaryLcpImageOptimizations
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2023 Google Inc.
*
* @wordpress-plugin
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="https://glitch.com/favicon.ico" />
<title>image-with-fetchpriority-and-with-preload.html</title>
<link
<?php
/**
* Contact Form 7 Conditional Enqueues WordPress Plugin.
*
* @package CF7_Conditional_Enqueues
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2023 Google Inc.
*
* @wordpress-plugin
<?php
/**
* Auto-Update Enabler
*
* Decisions, not options. Inspired by Trac ticket #58389 by
* Jos Velasco and an offhanded comment on the fedi by Andy
* Fragen.
*
* @package Auto-Update Enabler
* @author Jason Cosper <[email protected]>
@petermann
petermann / Disable WP REST API - Contact Form 7 Endpoints
Created April 28, 2023 18:54
Automatically Enable Contact Form 7 Endpoints with Disable WP REST API Plugin
/**
* Automatically Enable Contact Form 7 Endpoints with Disable WP REST API Plugin
* Plugin URI: https://wordpress.org/plugins/disable-wp-rest-api/
*/
function disable_wp_rest_api_enable_contact_form7_endpoints() {
$active_plugins = get_option('active_plugins');
// Check if the "Disable WP REST API" plugin is active
if (in_array('disable-wp-rest-api/disable-wp-rest-api.php', $active_plugins)
// Check if the "Contact Form 7" plugin is active
&& in_array('contact-form-7/wp-contact-form-7.php', $active_plugins)
@wp-seopress
wp-seopress / filter-the-request-to-generate-a-meta-title-with-ai.php
Last active July 25, 2023 08:29
Filter the request to generate a meta title with AI
add_filter('seopress_ai_openai_meta_title', 'sp_ai_openai_meta_title', 10, 2);
function sp_ai_openai_meta_title($prompt, $post_id) {
//$content = get_post_field('post_content', $post_id);
//$content = esc_attr(stripslashes_deep(wp_filter_nohtml_kses(wp_strip_all_tags(strip_shortcodes($content)))));
//$content = wp_trim_words( $content, 500 );
$language = 'fr_FR'; //example with French locale, replace with your own language code
$prompt = 'Generate, in this language ' . $language . ', an engaging SEO title metadata in one sentence of sixty characters maximum for this article: ' . $content;
return $prompt;
@thesephist
thesephist / options.oak
Created November 14, 2022 22:09
Collection of useful Stable Diffusion prompt modifiers
{ name: 'Lighting', options: [
'golden hour, warm glow'
'blue hour, twilight, ISO12000'
'midday, direct lighting, overhead sunlight'
'overcast, whitebox, flat lighting, diffuse'
'dreamlike diffuse ethereal lighting'
'dramatic lighting, dramatic shadows, illumination'
'studio lighting, professional lighting, well-lit'
'flash photography'
'low-key lighting, dimly lit'
@cdils
cdils / wpmdbpro-cli-remote-backup-script.sh
Last active October 25, 2022 19:21 — forked from JRGould/wpmdbpro-cli-remote-backup-script.sh
WP Migrate DB Pro CLI Backup Script
#!/bin/bash
#
# Declare SITES as an associative array
declare -A SITES
# Format: SITES[WPMDB profile number]=backup_filename_base
SITES[1]=remote_backup_com
#SITES[2]=another_site_to_backup
#SITES[3]=my_other_blog
## These variables will be specific to the WordPress