Skip to content

Instantly share code, notes, and snippets.

View BrianHenryIE's full-sized avatar
🇮🇪

Brian Henry BrianHenryIE

🇮🇪
View GitHub Profile
diff --git a/resolution.txt b/resolution.txt
index ea041c9..b71567d 100644
--- a/resolution.txt
+++ b/resolution.txt
@@ -4,47 +4,46 @@ WHEREAS, The City of Sacramento sees all human life as precious, and the targeti
WHEREAS, The City of Sacramento condemns the loss of all innocent civilian lives, regardless of their nationality, ethnicity or religious background;
-WHEREAS, The City of Sacramento recognizes that hundreds of Israeli hostages remain captive by Hamas in the Gaza Strip;
+WHEREAS, The City of Sacramento recognizes that more than 100 Israeli hostages remain captive by Hamas in the Gaza Strip;
@BrianHenryIE
BrianHenryIE / gist:f3152b4d3ba4da062bc0c9c0361c9c70
Created January 27, 2024 06:22
wyze-lockin-lock-gateway-wlgw01-esp serial boot 115200
21:55:07.525 -> ets Jun 8 2016 00:22:57
21:55:07.525 ->
21:55:07.525 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
21:55:07.525 -> flash read err, 1000
21:55:07.525 -> ets_main.c 371
21:55:07.877 -> ets Jun 8 2016 00:22:57
21:55:07.877 ->
21:55:07.877 -> rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
21:55:07.877 -> configsip: 0, SPIWP:0xee
21:55:07.877 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
@BrianHenryIE
BrianHenryIE / notifier.swift
Created October 22, 2023 22:02
Parse an executable for strings and add DistributedNotification listeners for each
//
// notifier
//
// Created by Josh Wisenbaker on 3/12/18.
// Copyright © 2018 Josh Wisenbaker. All rights reserved.
//
// @see https://gitlab.com/-/snippets/1704123
//
// @see https://medium.com/macoclock/finding-distributed-notifications-on-macos-catalina-b2a292aac5a1
//
@BrianHenryIE
BrianHenryIE / wp-plugin-update-urls.php
Created April 27, 2023 20:07
Get the list of plugin update URLs on a WordPress site
<?php
/**
* Get the list of plugin update URLs for a site, so they can be downloaded and tested locally/on staging before installing on production.
*
* Often plugins' licence keys can only be installed on one site, production is obviously chosen, then the plugin update
* can only be downloaded on production.
*/
/** @var array<string, string> $plugin_update_urls The plugin update download links keyed by plugin basename. */
$plugin_update_urls = array();
@BrianHenryIE
BrianHenryIE / lootly-wp.php
Created July 29, 2022 20:39
Fix for Lootly w/ Oxygen theme
<?
// In themes with do not call the get_footer action, this JavaScript will add the required Div.
$handle = 'lootly-create-div-script';
wp_register_script( $handle, '', array(), '1.2.3', true );
wp_enqueue_script( $handle );
$lootly_customer_id ='';
$lootly_customer_signature = '';
@BrianHenryIE
BrianHenryIE / actuator.py
Last active October 13, 2021 04:20
Donkey Car differential steering with dual DS3502 Digital Potentiometer
class DS3502_DIGITAL_POTENTIOMETER(object):
'''
DS3502 Digital Potentiometer to emulate throttle driving ebike ESC.
https://www.adafruit.com/product/4286
https://learn.adafruit.com/ds3502-i2c-potentiometer/arduino
https://cdn-learn.adafruit.com/downloads/pdf/ds3502-i2c-potentiometer.pdf
https://youtu.be/II0kozLDRyI
pip install adafruit-circuitpython-ds3502
https://github.com/adafruit/Adafruit_CircuitPython_DS3502
@BrianHenryIE
BrianHenryIE / actuator.py
Last active September 26, 2021 14:17
Donkey Car differential steering with dual MCP4725 DAC
class MCP4725_DAC(object):
'''
MCP4725 Digital to Analog Convertor to emulate throttle driving ebike ESC.
'''
def __init__(self, aaddress, busnum=1):
import board
import busio
import Adafruit_MCP4725
<?php
/**
* @wordpress-plugin
* Plugin Name: Check Coupon Allowed Emails Earlier
* Description: Compares the billing email address to coupons' "Allowed Emails" restrictions anytime the checkout is updated.
* Plugin URI: https://github.com/woocommerce/woocommerce/issues/28560
* Version: 1.0.0
* Author: BrianHenryIE
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
<?php
/**
* When the PayPal IPN is called, we'll replace the WC_Order class with a subclass that performs a currency conversion.
*
* NB: untested.
*
* @author BrianHenryIE
*/
/**
@BrianHenryIE
BrianHenryIE / class-wholesale-order-ui.php
Last active March 14, 2022 23:40
For Wholesale plugin, in WooCommerce order admin UI, add an action to toggle order between retail and wholesale.
<?php
/**
* Add an action on the WooCommerce orders page to toggle between wholesale and retail orders.
*
* Implemented:
* options 'wholesale'|'retail'
* `$order->add_meta_data('_wwpp_order_type', 'wholesale', true );`
*
* GPL 2+
*/