Skip to content

Instantly share code, notes, and snippets.

@cliffordp
cliffordp / list-direct-message-spam-phrases.txt
Last active February 24, 2025 18:10
List of social media spam DM phrases for GHL workflow snapshot. See https://tourkick.com/?p=15216
======
Snapshot created with these on 2024-04-16
======
1k =
1k follower
1k=
about page restriction
account will be deactivated
are you interested to grow your
automatically disabled your ads
@cliffordp
cliffordp / functions.php
Last active March 14, 2024 17:27
Shortcode: [copythis] write to clipboard
<?php
// [copythis]This will be copied[/copythis]
// @link https://gist.github.com/cliffordp/fe86cc09d5c6250453fc4c8ccf763e5b This snippet.
add_shortcode( 'copythis', function( $atts, $content = null ) {
return sprintf(
'<div class="copythis">%s</div>
<button onclick="navigator.clipboard.writeText(this.previousElementSibling.textContent)">Copy This</button>',
$content);
});
@cliffordp
cliffordp / ghl-custom-css-via-custom-values.css
Last active February 26, 2024 21:41
GHL website custom CSS via Custom Values
<style>
/* Video: https://youtu.be/u39v1o6iqc0 */
/* Code Source: https://gist.github.com/cliffordp/95dd05de071dd8f8ce0c73625ff7106d */
/* Buttons */
div[class*='button-'] a[class*='btn-'] {
background-color: {{custom_values.color_secondary}};
}
/* H1s */
<script id="bizname-enforce-default-url-query-param">
// Source: https://gist.github.com/cliffordp/f4aa43badd4d99cee537a82ff0e5ab3b
// Related: https://youtu.be/MHKzHf1BhrY
// Function to check for the 'bizname' query parameter and redirect if not present.
(function enforceDefaultBiznameQueryParam() {
const urlParams = new URLSearchParams(window.location.search);
const bizname = urlParams.get('bizname');
// If 'bizname' query param is not present or is an empty string, redirect.
@cliffordp
cliffordp / bypass-cloudflare-email-protection.js
Created February 16, 2024 16:31 — forked from neopunisher/bypass-cloudflare-email-protection.js
How to circumvent Cloudflare's [email protected] thing, WITHOUT enabling Javascript
// Adapted from https://raddle.me/f/Privacy/3722/how-to-circumvent-cloudflare-s-email-protected-thing-without with the help of chatGPT
function fixObfuscatedEmails() {
const elements = document.getElementsByClassName('__cf_email__');
for (let i = 0; i < elements.length; i++) {
const element = elements[i];
const obfuscatedEmail = element.getAttribute('data-cfemail');
if (obfuscatedEmail) {
const decodedEmail = decrypt(obfuscatedEmail);
element.setAttribute('href', 'mailto:' + decodedEmail);
element.innerHTML = decodedEmail;
@cliffordp
cliffordp / bulk-transfer-gh-issues.sh
Created December 30, 2023 17:25 — forked from slaFFik/bulk-transfer-gh-issues.sh
Open local repo to bulk transfer all its issues to a new repo: https://jloh.co/posts/bulk-migrate-issues-github-cli/
gh issue list -s all -L 500 --json number | \
jq -r '.[] | .number' | \
xargs -I% gh issue transfer % https://github.com/<destination repo>
@cliffordp
cliffordp / 0-not-needed.txt
Last active August 20, 2025 22:57
Go High Level funnels and websites: replace/insert text of any `.replace_location` class with the `location` URL query parameter. Works in <head> or <body>.
I did not know at the time of writing this code and recording this video (https://www.youtube.com/watch?v=MHKzHf1BhrY) that THIS IS POSSIBLE NATIVELY FROM GHL, NO CUSTOM CODE NEEDED, NO CUSTOM VALUE NEEDED!
Please use GHL Native functionality as documented here: https://help.gohighlevel.com/support/solutions/articles/48001172004
@cliffordp
cliffordp / addressValidation.deluge.js
Last active November 21, 2023 19:26
Zoho Flow custom function using Google Maps for address validation
map addressValidation(string addressString)
{
/**
* This snippet: https://gist.github.com/cliffordp/2654cda30ecd0029b1e617a0f7a0c6c9
*
* Pass each address parameter (address1, address2, city, state, zip, country) that you have in a comma-separated string,
* such as "1234 Easy Street, 55533".
*
* Will return a results map. Examples of what you could use in Zoho Flow:
* ${addressValidation.formattedAddress} is from API but may not include all address pieces (depends on input pieces)
@cliffordp
cliffordp / wp-config.php
Last active October 5, 2023 17:18
Cliff's WP_DEBUG defaults
<?php
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the Codex.
@cliffordp
cliffordp / GoalSeekZeroOrPositiveOnEmptyCells.vbs
Last active September 13, 2023 03:59
Rounds up to next (not nearest) $0.50
' Blank out all the Bonus column values, place your cursor in the Bonus column, then use this!'
Sub GoalSeekZeroOrPositiveOnEmptyCells()
Dim TargetRange As Range
Dim ChangingCell As Range
Dim CurrentCell As Range
' Loop through each cell in the current column
For Each CurrentCell In ActiveCell.CurrentRegion.Columns(ActiveCell.Column).Cells
' Check if the cell to the left is blank
If IsEmpty(CurrentCell.Offset(0, -1).Value) Then