Skip to content

Instantly share code, notes, and snippets.

CrandellWS / wp_head_hide_billing_fields_for_registered_users.php
Last active November 22, 2023 00:10 — forked from strangerstudios/wp_head_hide_billing_fields.php
Hide Paid Memberships Pro billing address fields and make them optional. Meant to be used with the Braintree gateway.
add_action('pmpro_checkout_before_submit_button', 'my_pmp_jquery');
function my_pmp_jquery() {
global $current_user;
if ($current_user->user_login) {
//script will hide billing fields and prefill name and email from WP account
jQuery( document ).ready(function($) {
CrandellWS / html2canvas.js
Last active September 14, 2023 20:17
html2canvas cors & cache workaround
* html2canvas 1.0.0-alpha.12-rc2 <>
* Copyright (c) 2018 Niklas von Hertzen <>
* Released under MIT License
* Editted By William Crandell
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
CrandellWS / Paintable.cs
Last active March 20, 2023 03:41 — forked from ditzel/Paintable.cs
Drawing Canvas
using System.Collections;
using System.IO;
using UnityEngine;
using UnityEngine.InputSystem;
public class SignatureCapture : MonoBehaviour
[SerializeField] private GameObject brushPrefab;
[SerializeField] private float brushSize = 0.1f;
[SerializeField] private RenderTexture renderTexture;
if (isset($_POST['dbhost'])) {
preg_match( '/^((?!-)[a-z0-9-]{1,63}(?<!-)(\.){0,1})+([a-z]{0,9})(?<!\.)((;port=){1}[0-9]{2,6}){0,1}$/i', $_POST['dbhost'], $matches);
echo "<pre>".print_r($matches, true)."</pre>";
$DB_HOST = $_POST['dbhost'];
$DB_DATABASE = $_POST['dbname'];
$DB_USERNAME = $_POST['dbuser'];
CrandellWS / Drive.php
Created June 25, 2022 20:43 — forked from bshaffer/Drive.php
Google Drive API (v3) - PHP
* Copyright 2010 Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
CrandellWS /
Last active April 12, 2021 10:39 — forked from robschmuecker/
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.

CrandellWS /
Created February 27, 2020 02:22 — forked from akhgupta/
leakcanary-android-no-op - Class,Method not found solution
// app/src/debug/java/com/akhil/sampleapp/
package com.akhil.sampleapp;
import com.squareup.leakcanary.AndroidExcludedRefs;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;
CrandellWS /
Last active March 14, 2019 23:04
Movie Trailer Page example
CrandellWS /
Created January 10, 2019 12:02 — forked from JohannesMP/LICENSE
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.

What is this?

A SceneReference wrapper class that uses ISerializationCallbackReceiver and a custom PropertyDrawerto provide safe, user-friendly scene references in scripts.

![alt text][1]

Why is this needed?