This file contains 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
sf org list limits --json | node -e "JSON.parse(require('fs').readFileSync(0,'utf-8')).result.filter(i=>i.remaining<i.max).forEach(i=>console.log(\`\${i.name}: \${((i.remaining/i.max)*100).toFixed(2)}% remaining\`))" |
This file contains 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 inherited sharing class PDFPrinter { | |
public static String getContent() { | |
String[] ids = ApexPages.currentPage().getParameters().get('ids').split(','); | |
// TODO do record access checks! | |
String content = ''; | |
for (String i : ids) { | |
PageReference p = new PageReference('/' + i + '/p'); | |
content += p.getContent().toString(); | |
} | |
content = content |
This file contains 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>Interactive CSV Plotter</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js"></script> | |
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> | |
</head> |
This file contains 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 class ModalList { | |
ApexPages.StandardSetController setCon; | |
public PageReference init() { | |
List<Id> ids = new List<Id>(); | |
for (SObject i : this.setCon.getSelected()) { | |
ids.add((String)i.get('Id')); | |
} | |
return new PageReference( | |
String.format('/lightning/cmp/c__ModalWrapper?c__ids={0}&c__returnUrl={1}', new String[]{ | |
String.join(ids, ','), |
This file contains 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
res=$(echo 'console.log(btoa(JSON.stringify({"componentDef" : "c:'$1'","attributes" :{"recordId" : "0031F00000rMHfAQAW","testAttribute" : "attribute value"}})))' | node) | |
url=/one/one.app#$res | |
echo $url | |
sfdx force:org:open -r -p $url --json | jq -r .result.url |
This file contains 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 class OpportunitiesSelector { | |
@AuraEnabled public static Object[] getByNames(String[] names) { | |
Contact[] contacts = [SELECT Id FROM Contact WHERE Name = :names]; | |
Account[] accounts = [SELECT Id FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE Id = :contacts)]; | |
Opportunity[] opportunities = [SELECT Id FROM Opportunity WHERE AccountId = :accounts]; | |
return new Object[]{ | |
contacts, | |
accounts, | |
opportunities | |
}; |
This file contains 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
<template> | |
<div class="slds-card"> | |
<div class="fullcall" lwc:dom="manual"></div> | |
</div> | |
</template> |
This file contains 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="force:appHostable, lightning:hasPageReference" > | |
<lightning:navigation aura:id="navigation"/> | |
<lightning:tabset variant="vertical" selectedTabId="{!v.pageReference.state.c__tab}"> | |
<lightning:tab label="Item One" id="one" onactive="{!c.handleActive}"> | |
First | |
</lightning:tab> | |
<lightning:tab label="Item 2" id="two" onactive="{!c.handleActive}"> | |
second | |
</lightning:tab> | |
<lightning:tab label="Item 3" id="three" onactive="{!c.handleActive}"> |
This file contains 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
<template> | |
<lightning-tabset variant="vertical" active-tab-value={activeTabValue}> | |
<lightning-tab label="Item One" value="one" onactive={handleActive}> | |
First | |
</lightning-tab> | |
<lightning-tab label="Item 2" value="two" onactive={handleActive}> | |
second | |
</lightning-tab> | |
<lightning-tab label="Item 3" value="three" onactive={handleActive}> | |
third |
This file contains 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 | |
set -e | |
set -o pipefail | |
CLIENT_ID=$1 | |
rm -f ./server.key | |
cat > ./server.key | |
sfdx auth:jwt:grant --setdefaultusername --clientid "$CLIENT_ID" --jwtkeyfile ./server.key --username [email protected] -a HubOrg | |
mv .forceignore .forceignore.orig |
NewerOlder