Skip to content

Instantly share code, notes, and snippets.

View jsullivanlive's full-sized avatar

James Sullivan jsullivanlive

View GitHub Profile
@jsullivanlive
jsullivanlive / SalesforceID.js
Last active December 17, 2020 20:17
SalesforceID.js
/**
* helper class to manage incrementing salesforce ids
* Author: CloudAnswers
* License: AGPL3
*/
const caseSafeId = require("./caseSafeId");
const base62 = require("base-x")(
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
);
@jsullivanlive
jsullivanlive / old stripe api versions don't return all products.md
Last active June 29, 2022 20:27
Stripe not returning newly created products

In case someone is googling for this:

I was trying to return a list of products in Stripe via their API and was not getting new products.

Stripe's api is versioned and the default version is set at your acount level. It turns out the last API upgrade I accepted was in 2011 (10 years ago) and the API was no longer returning new products. After enabling the newer api version it started returning all products.

@jsullivanlive
jsullivanlive / index.md
Last active April 19, 2022 17:16
Salesforce LMA App Deleting Licenses

Started getting this error email a few times a day as the owner of the LMA batch job in Salesforce:

caused by: sfLma.SubscriberUpdateException.LicenseUninstallException: Expected 1 license to delete but found 2

Class.sfLma.SubscriberUpdate.licenseUninstall: line 141, column 1

Apparently the app is deleting license records, but why?

@jsullivanlive
jsullivanlive / fixbranches.js
Created April 21, 2022 09:13
rebase hundreds of automated commits into linear history
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const ex = async (cmd) => {
console.log({cmd});
return exec(cmd).then(console.log);
}
async function run(branch) {
try {
await ex(`git switch ${branch}`);
await ex(`git rebase master -X ours`);
@jsullivanlive
jsullivanlive / email.txt
Last active August 25, 2022 15:34
Important Information About Heroku Free Products
Subject: Important Information About Heroku Free Products
Dear Customer,
Thank you for being a Heroku user. Starting November 28, 2022, free Heroku
Dynos, free Heroku Postgres, and free Heroku Data for Redis® will no longer
be available. You can learn more about these and other important changes
from our GM, Bob Wise, on the Heroku blog.
Existing free dynos and Heroku data add-ons will be impacted, so action
ConversationRuntimeProxyController.getFollowUpActions