Skip to content

Instantly share code, notes, and snippets.

@sjurgis
sjurgis / cal.html
Last active February 25, 2025 11:07
full calendar in umd format (for lwc)
<template>
<div class="slds-card">
<div class="fullcall" lwc:dom="manual"></div>
</div>
</template>
@itsmebasti
itsmebasti / GlobalDescribed.cls
Last active October 18, 2023 13:02
Apex SObject Describes performance testing
public with sharing class GlobalDescribe {
public static Map<String, SObjectType> TYPES = Schema.getGlobalDescribe();
public static Map<String, DescribeSObjectResult> DESCRIBES = new Map<String, DescribeSObjectResult>();
public static SObjectType type(String name) {
return TYPES.get(name);
}
public static DescribeSObjectResult get(String name) {
if(!DESCRIBES.containsKey(name)) {
@jeffdonthemic
jeffdonthemic / org_connection.js
Created March 25, 2019 21:15
jsforce with jwt
const jsforce = require('jsforce');
const jwt = require("salesforce-jwt-bearer-token-flow");
// create the connection to the org
let conn = new jsforce.Connection();
// load the private key for the token
let privateKey = require('fs').readFileSync('./server.key', 'utf8');
jwt.getToken({
/**
* A basic pub-sub mechanism for sibling component communication
*
* TODO - adopt standard flexipage sibling communication mechanism when it's available.
*/
const events = {};
/**
* Registers a callback for an event
@amphro
amphro / sfdx-push-recordtypes
Created May 5, 2017 21:17
Push RecordTypes and Data using SFDX
### Setup Import File and Permission Set
# Step 1. Export the RecordTypes
-> sfdx force:data:tree:export -q "SELECT ID, Name, DeveloperName, SobjectType FROM RecordType" -o data
Wrote 1 records to data/RecordType.json
# Here is what the export might look like
-> more data/RecordType.json
{