Skip to content

Instantly share code, notes, and snippets.

View BenjaminNelan's full-sized avatar
⌨️
Already had a function that did that.

Benjamin Nelan BenjaminNelan

⌨️
Already had a function that did that.
View GitHub Profile
@BenjaminNelan
BenjaminNelan / counterButton.js
Created July 29, 2023 16:15
Obsidian - Experimental tally button for use with dataviewjs and customjs.
// counterButton
// For use with CustomJS Obsidian Plugin
class counterButton {
async draw( self, key ) {
// Check self
if( typeof self == 'undefined' && typeof self !== 'DataviewInlineApi' ){
throw new Error("counterButton.draw() needs 'this' reference, eg. counterButton.draw(this,'<variableName>').")
}
// Instance
Verifying my identity on Peepeth.com 0x3de7f56c0a8483347dfc5565fa2a13de9394d122
@BenjaminNelan
BenjaminNelan / keybase.md
Created April 23, 2018 04:23
Verification

Keybase proof

I hereby claim:

  • I am benjaminnelan on github.
  • I am benjaminnelan (https://keybase.io/benjaminnelan) on keybase.
  • I have a public key ASAuErr9RMInvBIbe7-EQwtVL7lp_ZGjfx8fvWhStjgCGAo

To claim this, I am signing this object:

@BenjaminNelan
BenjaminNelan / functions.php
Last active September 9, 2017 01:52 — forked from woogist/functions.php
Fixes issue with WooCommerce Subscription Orders using PayPal to break during scheduling
function wc_subscriptions_custom_price_string( $pricestring ) {
global $product;
$products_to_change = array( 45, 90, 238 );
if ( method_exists( $product, 'get_id' ) && in_array( $product->get_id(), $products_to_change ) ) {
$pricestring = str_replace( 'every 3 months', 'per season', $pricestring );
}
return $pricestring;