This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @IsTest(IsParallel =false) // ContentWorkspace | |
| public class InsertContentDocumentLinkTest { | |
| @IsTest | |
| static void do_a_thing() { | |
| CollaborationGroup unlistedGroup = new CollaborationGroup( | |
| Name = 'Unlisted', | |
| CollaborationType = 'Unlisted' | |
| ); | |
| insert unlistedGroup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RangeIterator implements Iterable<Integer> { | |
| Integer start; | |
| Integer stop; | |
| public RangeIterator(Integer start, Integer stop) { | |
| this.start = start; | |
| this.stop = stop; | |
| } | |
| public Iterator<Integer> iterator() { | |
| return new RangeIterable(start, stop); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| CHANGESET_NAME=$1 | |
| if [[ "$CHANGESET_NAME" == "" ]]; then | |
| echo No change set specified | |
| exit 1 | |
| fi | |
| DEST_ORG=$2 | |
| if [[ "$DEST_ORG" == "" ]]; then | |
| DEST_ORG=`sfdx force:org:display | grep Alias | awk '{print $2}'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @IsTest(IsParallel = true) | |
| public class TimezoneTest { | |
| @TestSetup | |
| static void makeData() { | |
| update new User(Id = UserInfo.getUserId(), TimeZoneSidKey = 'America/Denver'); | |
| } | |
| @IsTest | |
| static void it_should_demonstrate_datetime_handling_with_timezones() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @IsTest | |
| public class StubProviderImpl implements System.StubProvider { | |
| public Type mockType {get; private set;} | |
| private Map<String, Object> mockedCalls {get; set;} | |
| private Map<String, Exception> mockedExceptions {get; set;} | |
| private Map<String, Object[]> callLog {get; set;} | |
| public StubProviderImpl(Type mockType) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DependencyResolver { | |
| @TestVisible | |
| private static Map<Type, Object> cachedDependencies {get; set;} | |
| static { | |
| cachedDependencies = new Map<Type, Object>(); | |
| } | |
| // core methods abstract the core logic | |
| public static Object getInstance(Type classType) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component implements="forceCommunity:availableForAllPageTypes"> | |
| <aura:attribute name="label" type="String" required="true" /> | |
| <aura:attribute name="flowApiName" type="String" required="true" /> | |
| <aura:attribute name="recordId" type="String" /> | |
| <aura:attribute name="buttonStretched" type="Boolean" default="true" /> | |
| <aura:attribute name="buttonVariant" type="String" required="true" /> | |
| <aura:attribute name="buttonPadding" type="String" required="true" /> | |
| <aura:attribute name="buttonClasses" type="String" /> | |
| <aura:attribute name="overLayModal" type="Object" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public without sharing class Toggles { | |
| private static final Map<String, Boolean> TOGGLE_CACHE; | |
| static { | |
| TOGGLE_CACHE = new Map<String, Boolean>(); | |
| loadToggles(); | |
| } | |
| // temporary toggle - remove after enabled | |
| public static Boolean DISABLE_CERT_MEMBERSHIP_EXTENSIONS { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| write_xml () { | |
| local type_name="$1" | |
| shift | |
| local type_arry=("$@") | |
| XML="${XML}\n\t<types>\n\t\t<name>${type_name}</name>" | |
| for FILENAME in "${type_arry[@]}"; do | |
| XML="${XML}\n\t\t<members>${FILENAME}</members>" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Redirect to new SFDC release notes | |
| // @namespace https://gist.github.com/gbutt/e62c691887887b8287b382455c0194c9 | |
| // @version 0.1 | |
| // @description Injects a link to new SFDC Release Notes into the old Release Notes page | |
| // @author Greg Butt | |
| // @match https://releasenotes.docs.salesforce.com/* | |
| // @grant none | |
| // ==/UserScript== |