Instantly share code, notes, and snippets.

View deploy_with_exit_codes.js
#!/usr/local/bin/node
var fs=require('fs');
var child_process=require('child_process');
var username='keir.bowden@sfdx.deploy';
var deployParams=['force:mdapi:deploy', '-d', 'Orchestrate/src',
'-u', username, '--json'];
View deploy_notify.js
#!/usr/local/bin/node
var fs=require('fs');
var child_process=require('child_process');
var username='keir.bowden@sfdx.deploy';
var deployParams=['force:mdapi:deploy', '-d', 'src',
'-u', username, '--json'];
View deploy_format_output.js
#!/usr/local/bin/node
var fs=require('fs');
var child_process=require('child_process');
var username='keir.bowden@sfdx.deploy';
var deployParams=['force:mdapi:deploy', '-d', 'src',
'-u', username, '--json'];
View tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "node",
"args": [
"deploy.js"
],
"problemMatcher": [ {
View deploy.js
#!/usr/local/bin/node
var fs=require('fs');
var child_process=require('child_process');
var username='keir.bowden@googlemail.com';
var deployParams=['force:mdapi:deploy', '-d', 'src',
'-u', username, '--json'];
View NotHotDog.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" access="global" controller="EinsteinVision_Admin">
<aura:attribute name="initialised" type="boolean" default="false" />
<aura:attribute name="files" type="Object[]"/>
<aura:attribute name="spinnerWaiting" type="Boolean" default="false"/>
<aura:attribute name="image" type="String" />
<aura:attribute name="imagedata" type="String" />
<aura:attribute name="result" type="String" default="Need a picture"/>
<aura:attribute name="showResult" type="Boolean" default="false" />
<div class="slds-page-header">
View VFPageMetrics.page
<apex:page >
<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>
<script src="../../soap/ajax/40.0/connection.js"
type="text/javascript"></script>
<script type="text/javascript">
function getMetrics()
{
View UserFreezerApp.app
<aura:application >
<c:UserFreezer />
</aura:application>
View UserFreezer.css
.THIS td {
padding: 3px 5px 2px 5px;
}
.THIS th {
padding: 3px 5px 2px 5px;
font-weight: bold;
border-bottom: 1px solid black;
}
.THIS .apply {
text-align: right;
View UserFreezerHelper.js
({
doInit : function(cmp, ev) {
cmp.set('v.Message', 'Retrieving user details');
var action = cmp.get("c.GetUserDetails");
var self = this;
action.setCallback(this, function(response) {
self.actionResponseHandler(response, cmp, self, self.gotUserDetails, 'Retrieved User Details');
});
$A.enqueueAction(action);