Skip to content

Instantly share code, notes, and snippets.

View ElmsPark's full-sized avatar

ElmsPark ElmsPark

  • ElmsPark Consultants
  • Dublin
  • 23:40 (UTC +01:00)
View GitHub Profile
@ElmsPark
ElmsPark / drafting-rules.md
Created April 23, 2026 16:57
EP Helpdesk auto-reply fix — 2026-04-23

EP Helpdesk drafting rules changes (v1.2.2)

Source: ep-helpdesk/src/includes/class-ep-helpdesk-ai.php.


Pass 1: generate_draft() — Rules block appended

- Be concise: 2-4 short paragraphs maximum
@ElmsPark
ElmsPark / mlx_distributed_deepseek.md
Created December 20, 2025 06:26 — forked from awni/mlx_distributed_deepseek.md
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

@ElmsPark
ElmsPark / markdown-text-101.md
Created August 11, 2025 13:31 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@ElmsPark
ElmsPark / stop-video.js
Created January 20, 2022 15:43 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@ElmsPark
ElmsPark / Limit Gravity Forms Upload Size
Created January 16, 2022 14:12 — forked from mandiwise/Limit Gravity Forms Upload Size
Set a maximum upload size for a Gravity Forms image field
function limit_file_upload_size( $validation_result ) {
$form = $validation_result['form'];
foreach( $form['fields'] as &$field ){
// NOTE: Add a custom CSS class to your image upload field and grab onto it here...
if( strpos( $field['cssClass'], 'choose-file' ) === false )
continue;
@ElmsPark
ElmsPark / ar-quick-look.php
Created January 15, 2022 22:42 — forked from alpipego/ar-quick-look.php
Upload USDZ/Reality files for AR Quick Look to WordPress
<?php
/**
* Plugin Name: Upload AR Quick Look files
* Description: Upload AR Quick Look files (usdz or reality) to your WordPress media library.
* Author: Alexander Goller
* Author URI: https://alexandergoller.com
*/
$arMimes = [
@ElmsPark
ElmsPark / create_wordpress_login_form_shortcode.php
Created August 2, 2021 00:49 — forked from Njengah/create_wordpress_login_form_shortcode.php
Create Custom WordPress login form without plugin [ WordPress Login form Shortcode ]
<?php
/**
* Code to Create Custom WordPress login form without plugin
* @author Joe Njenga
* @ gist -
*/
// Step 1: Create shortcode
function njengah_add_login_shortcode() {
@ElmsPark
ElmsPark / kinsta-share-users.php
Created March 17, 2021 19:28 — forked from carlodaniele/kinsta-share-users.php
A plugin to share users and usermeta tables between independent WordPress installations. This plugin requires CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE defined into wp-config file
<?php
/**
* @package Kinsta_Share_Users
* @version 1.0
*/
/*
Plugin Name: Kinsta Share Users
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin for Kinsta blog readers
Author: Carlo Daniele
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>604609311.14479399</real>
<key>Macros</key>
@ElmsPark
ElmsPark / ipn.php
Created June 25, 2020 10:39
PayPal Multiple IPN
<?php
ini_set( 'max_execution_time', 0 ); /* Do not abort with timeouts */
ini_set( 'display_errors', 'Off' ); /* Do not display any errors to anyone */
$urls = array(); /* The broadcast session queue */
/* List of IPN listener points */
$ipns = array(
'edd' => 'https://domain.com/?edd-listener=IPN',
'edd_payments' => 'https://domain.com/?Paypal_For_Edd=&action=ipn_handler',