Skip to content

Instantly share code, notes, and snippets.

View jsullivanlive's full-sized avatar

James Sullivan jsullivanlive

View GitHub Profile
@jsullivanlive
jsullivanlive / .prettierignore
Created December 18, 2018 11:02
How to make prettier ignore Salesforce's imitation JSX format html
**/lwc/**/*.html
@jsullivanlive
jsullivanlive / gist:289ddd9f2a7f12985f5e48689682c239
Created December 11, 2019 09:05
ram copy permission sets when switching profile
/*
Set<Id> permissionSetIds = new Set<Id>();
for (PermissionSetAssignment psa : [
select PermissionSetId
from PermissionSetAssignment
where AssigneeId = '005d0000001rkdpAAA'
]) permissionSetIds.add(psa.PermissionSetId);
System.debug(JSON.serialize(permissionSetIds));
*/
@jsullivanlive
jsullivanlive / 2020-01-31 Salesforce Create Audit Fields for Task.md
Last active April 8, 2020 09:29
2020-01-31 Salesforce Create Audit Fields for Task
@jsullivanlive
jsullivanlive / add swap in ubuntu
Created February 2, 2020 08:26
2020-02-02 add swap in ubuntu
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
@jsullivanlive
jsullivanlive / gist:216322dd2692b78a54ac07b858f82af4
Last active March 10, 2020 15:45
salesforce trailblazer nigerian-syle scammer
Mohamed Yaya (AFRICA DEVELOPMENT BANK)
Urgent Message for the Family of Sullivan
This is a personal email directed to you and I request that it be treated as such. I am Mr.Mohamed Yaya, a personal auditor to Engineer A.K.Sullivan account with the Africa Development Bank,LOME TOGO,He died some years ago in an auto accident and he left huge amount of money in the bank for no one to claim it.I want you to provide an account where this funds can be transferred to,since you have the same last name.I will like to present you to the bank here as the relative of my late client who come to claim the money (24.1 million united State dollars) deposited in the bank here in Lome Togo Africa but i have to register your information in the database as next of kin.
These are the information’s you are to send:
1.Your full names.......
2.Your date of birth..........
3.Your private telephone and fax numbers..........
@jsullivanlive
jsullivanlive / index.js
Created April 9, 2020 22:42
intercom search error
const axios = require("axios");
var basicAuth = {
auth: {
username: process.env.INTERCOM_TOKEN,
password: "",
},
};
(async () => {
@jsullivanlive
jsullivanlive / index.js
Created April 10, 2020 19:56
how to update intercom user and clear the user_id value
// currently this does not work, we get 2xx return code but user_id is still on record
const axios = require("axios");
var basicAuth = {
auth: {
username: process.env.INTERCOM_TOKEN,
password: "",
},
};
var id = 'intercom user id';
@jsullivanlive
jsullivanlive / incremental_deploy.sh
Last active April 17, 2020 23:48
incremental deploy for salesforce metadata
#!/bin/bash
# TODO don't do master, do wherever the PR is going to?
# TODO validate that there were diffs?
# needed or diff will not be based on our current git
Echo "********** RESETTING GIT FOR CLEAN DIFF **********"
git reset --hard
ZIPFILE=diff-archive.zip
@jsullivanlive
jsullivanlive / Salesforce Duplicate Activation Error.txt
Last active April 22, 2020 08:27
Salesforce Duplicate Activation Error
From: Salesforce Duplicate Management ([email protected]) <[email protected]>
Subject: We can't activate your Salesforce matching rule
Hello James Sullivan,
You tried to activate the matching rule Lead Email for identifying duplicate records. However, we can't activate the rule because it defines an unusually large number of records as possible duplicates. Specifically, take a closer look at these fields:
Email
@jsullivanlive
jsullivanlive / fix appexchange sandbox emails.txt
Created April 22, 2020 09:05
fix appexchange sandbox emails.txt
/* scheduled hourly */
List<Lead> leads = [
select Id, Email
from Lead
where IsConverted = false
and Email like '%=%@%example.com'
limit 100
];
for (Lead l : leads) {