Skip to content

Instantly share code, notes, and snippets.

View AltiusRupert's full-sized avatar

Rupert Barrow AltiusRupert

View GitHub Profile
@AltiusRupert
AltiusRupert / apex-prettier.yml
Created May 21, 2021 06:43 — forked from sjurgis/apex-prettier.yml
apex-prettier Github Action
name: apex pretify
on:
push:
paths:
- 'myns/main/core/classes/**'
- 'myns/main/default/classes/**'
- 'myns/main/services/classes/**'
- 'myns/main/services/classes/tests/**'
- 'myns/tests/classes/**'
jobs:
@AltiusRupert
AltiusRupert / README.md
Last active June 10, 2020 09:09
In SFDX, script to identify all changes made on this branch, to generate package.xms and destructiveChanges.xml

In SFDX, script to identify all changes made on this branch, to generate package.xml and destructiveChanges.xml

Introduction

Make changes on feature branches, then merge them into a sandbox branch. This script identifies all changes made on this sandbox branch since it was created, and generates the package.xml (and destructiveChanges.xml) to push changes to the sandbox. If you are doing CI (Continuous Integration), it will let you find changes since the previous commit.

Flow

In feature branch, VS Code feature workspace, and scratch org :

  1. make changes on a feature branch in scratch orgs
@AltiusRupert
AltiusRupert / gist:d5e2384d1166882a5cb34a557fb5dde7
Created December 5, 2019 13:03 — forked from yesvods/gist:51af798dd1e7058625f4
Merge Arrays in one with ES6 Array spread
const arr1 = [1,2,3]
const arr2 = [4,5,6]
const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6]
@AltiusRupert
AltiusRupert / Converting an existing Salesforce production org to SFDX and Github.md
Last active September 8, 2020 08:57
SFDX - Converting an existing Salesforce production org to DX and Github in 4 steps
@AltiusRupert
AltiusRupert / NamedCredential.cls
Last active July 5, 2024 09:24
Create Salesforce Named Credentials via Apex
// see https://salesforce.stackexchange.com/questions/165551/possible-to-update-namedcredential-from-apex
MetadataService.NamedCredential credential = new MetadataService.NamedCredential();
credential.fullName = 'Demo_Credential';
credential.label = 'Demo Credential';
credential.endpoint = 'https://www.DEMO2.com';
credential.principalType = 'NamedUser';
credential.protocol = 'NoAuthentication';
system.debug(createMetadata(credential));
@AltiusRupert
AltiusRupert / .block
Created November 19, 2017 13:59 — forked from mbostock/.block
Labeled Force Layout
license: gpl-3.0
@AltiusRupert
AltiusRupert / .block
Last active November 19, 2017 13:21 — forked from mbostock/.block
Force-Directed Graph
license: gpl-3.0
height: 600