Skip to content

Instantly share code, notes, and snippets.

View mtetlow's full-sized avatar

Mike "Mikename" Tetlow mtetlow

View GitHub Profile
@mtetlow
mtetlow / html markup
Created January 23, 2017 16:57
css progress bar indicator
<div class="progress-bar--container">
<div class="{!(v.projectCompletionPercentage == 0) ? 'progress-bar--bar progress-bar--zerowidthbar' : 'progress-bar--bar'}" style="{!'width: '+v.projectCompletionPercentage+'%'}">
<span class="progress-bar--pct-complete-label">{!v.projectCompletionPercentage+'%'}</span>
</div>
</div>
@mtetlow
mtetlow / gist:3e6869852280f3172e42ad766580b9e8
Created November 13, 2017 15:19
sfdx df17 migration notes
#TODO: Highlight line where cursor
Look at app:
https://sfdxdf17.na73.visual.force.com/apex/myApp?sfdc.tabName=01r1I000000c3dy
Examine app source
https://github.com/mtetlow/sfdxdf17-demo
###
<apex:page docType="html-5.0" standardStylesheets="false" showHeader="false" sidebar="false" standardController="Case" applyHtmlTag="false" applyBodyTag="false">
<html>
<body>
<iframe style="width: 100%; height: 300px; border: 0;"
src='/apex/TASKRAY__trChecklistAction?Id={!Case.REPLACE_WITH_YOUR_CUSTOM_FIELD_NAME}' />
</body>
</html>
<apex:page standardController="TASKRAY__Project_Task__c" sidebar="false" showHeader="false">
<apex:slds />
<!-- Need to include chatter so the new button on the AttachedContentNotes related list works -->
<style>
.hidden {
display: none;
}
</style>
@mtetlow
mtetlow / how_to_parse_this.java
Last active October 28, 2019 23:32
ConnectApi.SmartDataDiscovery API
ConnectApi.SmartDataDiscoveryPredictInputRecords input = new ConnectApi.SmartDataDiscoveryPredictInputRecords();
input.predictionDefinition = '0ORf0000000xxxxxxx';
input.records = new List<Id>{'a291Y000002Exxxxxxx'};
ConnectApi.SmartDataDiscoveryPrediction request =
ConnectApi.SmartDataDiscovery.predict(input);
// Everything up to here so far so good
System.debug('ConnectApi.SmartDataDiscoveryPrediction');
System.debug(JSON.serializePretty(request));