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 | |
.history | |
.sfdx | |
scratch.js | |
sfdx-project.json | |
config | |
scripts |
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
<div class="slds-grid slds-gutters"> | |
<div class="slds-col"> | |
<span>1</span> | |
</div> | |
<div class="slds-col"> | |
<span>2</span> | |
</div> |
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
import { ShowToastEvent } from 'lightning/platformShowToastEvent' | |
/** | |
* | |
* @param {String} str - String to capitalize the first character | |
* @returns {String} String with first character capitalized | |
*/ | |
export function capitalize(str){ | |
return str.charAt(0).toUpperCase() + str.slice(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
@RestResource(urlMapping='/RestService/*') | |
global with sharing class RestService { | |
@HttpPost | |
global static String wookiehookie(String data) { | |
System.debug(data); | |
return '"had_data": "' +data+ '"'; | |
} |
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
<apex:page> | |
<head> | |
<script src="{!$Resource.jquery224}"></script> <!-- https://jquery.com/ --> | |
<script src="{!$Resource.jsforce170}"></script> <!-- https://jsforce.github.io/ --> | |
<script>$j = jQuery.noConflict();</script> | |
</head> | |
<body> | |
<form> |
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
const atob = a => Buffer.from(a, 'base64').toString('binary') | |
module.exports = { atob } |
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
const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
async function something() { | |
console.log("this might take some time...."); | |
await delay(5000); | |
console.log("done!") | |
} | |
something(); |
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
@AuraEnabled | |
public static Boolean isCommunity(){ | |
Boolean isCommunity = false; | |
String host = URL.getSalesforceBaseUrl().toExternalForm(); | |
String uri = host.replace('https://', ''); | |
for(Domain d : [SELECT Domain FROM Domain]){ | |
if(d.Domain == uri){ |
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
/* | |
// Example implementation as follows: | |
public class AWSS3_GetService extends AWS { | |
public override void init() { | |
endpoint = new Url('https://s3.amazonaws.com/'); | |
resource = '/'; | |
region = 'us-east-1'; | |
service = 's3'; | |
accessKey = 'my-key-here'; | |
method = HttpMethod.XGET; |
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
{ | |
"search.exclude": { | |
"**/node_modules": true, | |
"**/bower_components": true, | |
"**/.sfdx": true, | |
"**/.history": true, | |
}, | |
"search.include": { | |
"**/apex": true, | |
"**/aura": true, |