Skip to content

Instantly share code, notes, and snippets.

View dhaupin's full-sized avatar

dhaupin dhaupin

View GitHub Profile
@dhaupin
dhaupin / Vant-0.8.6-flow.txt
Created May 30, 2026 02:29
Vant-0.8.6-flow
╔══════════════════════════════════════════════════════════════════════╗
║ vant.js (MAIN) ║
╠══════════════════════════════════════════════════════════════════════╣
║ ║
║ init() ──────→ boot.init() ║
║ └─ 1. sudo.createTask() ║
║ └─ 2. sandbox.init() ║
║ └─ 3. qos.init() ║
║ └─ 4. escrow init ║
║ └─ 5. lock.init() ║
@dhaupin
dhaupin / prompt-think-all.md
Last active May 9, 2026 05:11
Promp Thinking

Let's discuss, and prepare batches. Don't build yet. Deep think in code review mode please. Consider the outcomes on a specific level, and on a global app level. Consider documentation, setup, and edge cases. Take your time. Thank you.

@dhaupin
dhaupin / prompt-batch-all.md
Last active May 7, 2026 00:59
Prompt Batching - Clean

Batch through each task, documenting changes, additions, and/or features and adding to changelog. Do QC, Qos, and security passes/audits after each batch. Use deep think, code review skill, triaging with experts and utilizing skills. Take your time. Think it through. Do not bump version anywhere unless requested by user. Thank you!

@dhaupin
dhaupin / prompt-batch-vant.md
Last active May 7, 2026 00:58
Prompt Batching - Vant

Batch through each task, documenting changes, additions, and/or features on /docs, cli/mcp help, /dist, and/or changelog. Do QC, Qos, and security passes/audits after each batch. Use deep think, code review skill, triaging with experts and utilizing skills. Take your time. Think it through. Do not bump version anywhere unless requested by user. Thank you!

@dhaupin
dhaupin / tmp-console-dump.md
Last active May 7, 2026 01:01
TMP Console Dump
We couldn’t find that file to show.
@dhaupin
dhaupin / gist:28328adbb95d09ce6f05bedb70b7f925
Created April 7, 2026 23:12
Moto Android 15 Touch Sensitivity Settings
Android settings and ADB commands that may or may not increase touch sensitivity on moto devices.
------------------------------------------------
settings put system touch_sensitivity_mode 1
settings put secure screen_protector_mode 1
------------------------------------------------
settings put system glove_use 1
@dhaupin
dhaupin / dev_wp_shortcode_woo_login_register.php
Last active November 15, 2020 06:16
Wordpress shortcode to display WP or Woocommerce login forms
<?php
/**
* Shortcode - Render Wordpress login form
**/
add_shortcode('wp_login_form', function() {
if (is_user_logged_in()) {
} else {
ob_start();
@dhaupin
dhaupin / dev_script_ckeditor_plugin_wrapper.js
Last active June 28, 2017 18:51
CKEditor - Example Plugin Wrapper/Init for Config.js - Extending Autosave
// Make sure you include the plugin_wrapper as last item in config.extraPluins
CKEDITOR.editorConfig = function(config) {
config.extraPlugins = 'autosave,plugin_wrapper';
// Define empty autosave object
config.autosave = {};
}
// Extend instance plugins
CKEDITOR.plugins.add('plugin_wrapper', {
@dhaupin
dhaupin / dev_script_get_date_offset.php
Last active June 7, 2017 17:44
Function: Get date offset accounting for weekends and holidays
<?php
// Requires PHP 5.4+
function getWorkingDaysFrom($start, $amtOfDays) {
$globalDays = 0; // a global addition to $amtOfDays (such as a minimum shipping time of 3 days across all objects)
$amtOfDays = $amtOfDays + $globalDays; // set base amount of days for initial range before calculations applied
$ignore = array('6', '7'); // days of the week to ignore (weekends are 6 & 7) in ISO-8061
$holidays = array(
(new DateTime('first monday of january +1 year'))->format('*-m-d'), // new years day (celebrated)
@dhaupin
dhaupin / dev_opencart_img_check.php
Last active October 3, 2018 04:47
Opencart - Crawls over database looking for images/pdfs used and outputs them as a simple text list. CP/Rclone/PHP can use this list to truncate out unused files.
<?php
# Idea from: https://github.com/zenseo/opencart-needless-image
# PHP is not good enough to run this through a large store with many images
# Bash cp cant hold enough arguments from file output unless its batched
# Rclone is the best bet:
# rsync -asv --dry-run --recursive --remove-source-files --checksum --files-from=some-file.txt . destination/
function findImages() {
$tables_to_check = array(