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
// SAMPLE USAGE | |
import * as toaster from 'c/toaster'; | |
export default class MyComponent extends LightningElement {} | |
connectedCallback() { | |
toaster.init(this); | |
} | |
save() { |
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
(IF(AND((5 - (CASE(MOD( FirstDate__c - DATE(1900, 1, 6), 7), 0, 0, 1, 5, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0)) < (CASE(MOD( SecondDate__c - DATE(1900, 1, 6), 7), 0, 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 0)) ), | |
((( SecondDate__c - FirstDate__c ) + 1) < 7)), | |
((CASE(MOD( SecondDate__c - DATE(1900, 1, 6), 7), 0, 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 0)) - (5 - (CASE(MOD( FirstDate__c - DATE(1900, 1, 6), 7), 0, 0, 1, 5, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0)))), | |
(((FLOOR((( SecondDate__c - FirstDate__c ) - (CASE(MOD( FirstDate__c - DATE(1900, 1, 6), 7), 0, 0, 1, 6, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0))) / 7)) * 5) + | |
(CASE(MOD( FirstDate__c - DATE(1900, 1, 6), 7), 0, 0, 1, 5, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0)) + | |
(CASE(MOD( SecondDate__c - DATE(1900, 1, 6), 7), 0, 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 0))))-1) |
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
env=~/.ssh/agent.env | |
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } | |
agent_start () { | |
(umask 077; ssh-agent >| "$env") | |
. "$env" >| /dev/null ; } | |
add_keys () { | |
# *** path to SSH Key(s) here *** |
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
List<SObjectType> types = new List<SObjectType> { | |
Account.getSObjectType(), | |
Contact.getSObjectType(), | |
Opportunity.getSObjectType(), | |
Lead.getSObjectType() | |
}; | |
List<Field> fields = new List<Field>(); | |
for (SObjectType t : types) { | |
Schema.DescribeSObjectResult dsor = t.getDescribe(); |
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
# List all Apex Classes from path, without file extensions. | |
ls force-app/main/default/classes | grep -E \.cls$ | sed s/.cls//g |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
html, | |
body { | |
margin: 0; |
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
# These are some Java and Maven commands I want to keep handy | |
# Create a clean package, wipes out /target, compiles, runs tests, and generates a brand new .jar | |
mvn clean package | |
# Run the jar | |
java -jar target/myapp.jar | |
# List the contents of the jar | |
jar tf target/myapp.jar |
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 with sharing MyClass { | |
public KbManagerI kavManager; | |
public MyClass() { | |
// Default KbManager Implementation | |
this(new MyKbManager()); | |
} | |
// Allows for Constructor Injection, so we can change the implementation for our tests. | |
public MyClass(KbManagerI km) { |
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
Show hidden characters
{ | |
"parserOptions": { | |
"ecmaVersion": 2020, | |
"sourceType": "module" | |
}, | |
"rules": { | |
"semi": "error" | |
} | |
} |
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
@Configuration | |
public class RestTemplateConfiguration { | |
public static final String REST_TEMPLATE_NAME = "someRestTemplate"; | |
@Autowired | |
private AppConfig appConfig; | |
@Value("${props.useProxy}) | |
private boolean useProxy; |
NewerOlder