Skip to content

Instantly share code, notes, and snippets.

@benahm
benahm / deployDestructiveChange.sh
Last active February 15, 2024 18:45
Deploy a destructive change using the Salesforce CLI
#!/bin/sh
#
# author : benahm
# description : deploy a destructive change
# inputs
TARGET_ENV=$1
SOURCE_PATH=$2
# constants
@benahm
benahm / GenerateFullPackageXML.sh
Last active July 16, 2023 06:42
Generate a full Package.xml using the Salesforce CLI
#!/bin/sh
#
# Generate a full package xml using the Salesforce CLI
# Requirements :
# * Salesforce CLI
# * jq
@corbanb
corbanb / pre-request-jwt.js
Last active July 22, 2024 13:12
JWT tokenize - Postman Pre-Request Script
function base64url(source) {
// Encode in classical base64
encodedSource = CryptoJS.enc.Base64.stringify(source);
// Remove padding equal characters
encodedSource = encodedSource.replace(/=+$/, '');
// Replace characters according to base64url specifications
encodedSource = encodedSource.replace(/\+/g, '-');
encodedSource = encodedSource.replace(/\//g, '_');