Skip to content

Instantly share code, notes, and snippets.

@stevewithington
stevewithington / muraExtendedAttributes.cfm
Last active December 14, 2023 10:42
Mura CMS : In version 6.1, you can now obtain a Content Bean's extended attributes as a struct, and even pass in the Extend Set Name to get specific sets of extended attributes.
<cfoutput>
<cfscript>
// Access all of the current content bean's extended attributes
$.content().getExtendedAttributes();
// Access a specific Extend Set's attributes of the current content bean
$.content().getExtendedAttributes(name='Your Extend Set Name Goes Here');
// Access a query/recordset of the current content bean's extended attributes
$.content().getExtendedAttributesQuery();
@patio11
patio11 / annual-prepay.md
Last active February 23, 2024 11:16
Appointment Reminder Annual Pre-pay copy (2014)

Notes

This is the latest version of an email which I send periodically, offering customers the opportunity to pre-pay for SaaS in return for a discount. The benefits to the SaaS company are better cash flow and reduced churn rate. The benefits to the customer are, well, in the email. This genre of email has produced hundreds of thousands of dollars in pre-pays for some companies I work with, and it rarely requires any more work than this example.

I've put $79 is as a placeholder for the cost of the user's plan. We calculate that for each account, naturally, along with the billing contact's name.

Subject: Save $79 on Appointment Reminder (and get a tax write-off) Formatting: 100% plain text. Gmail automatically links up the central link. From: Patrick McKenzie (Appointment Reminder) patrick@appointmentreminder.org

@christierney402
christierney402 / queryToArray.cfc
Last active September 10, 2015 22:41
ColdFusion 10+ Query to Array of Stucts
// convert a query to an array of structs
// credit: http://www.bennadel.com/blog/2367-coldfusion-10---looping-over-queries-using-a-for-in-loop-in-cfscript.htm
function queryToArray( required query query ){
var queryAsArray = [];
for (var row in query){
arrayAppend( queryAsArray, row );
}
return(queryAsArray);
}
@alexdevero
alexdevero / print-blinkist.js
Last active May 18, 2022 18:15
print-blinkist.js
/**
* Simple snippet for printing free book summaries on https://www.blinkist.com/nc/daily
* Open the book and use following code via browser console.
*/
$('.page main header, main .daily__top-menu, .reader__container > .reader__container__left, .reader__container__content .chapter.promotion, .reader__container__content .reader__container__buttons, .reader__container .reader__container__full__bottom_bar, .reader__container .reader__container__partial__bottom_bar').remove();
$('.reader__container__right .reader__container__content .chapter').css('display', 'block');
$('.chapter.supplement h1').css('margin-top', '0');