Skip to content

Instantly share code, notes, and snippets.

View jsmithdev's full-sized avatar
🏗️
building things

Jamie Smith jsmithdev

🏗️
building things
View GitHub Profile
@jsmithdev
jsmithdev / readme_sfdx_deploy.md
Last active December 8, 2020 15:53
readme sfdx deploy.md

Deploy

Covert with SFDX; This creates a folder called deploy

sfdx force:source:convert -r force-app -d deploy

Now you can deploy from the resulting deploy directory

@jsmithdev
jsmithdev / readme_sig.md
Created March 27, 2020 17:28
readme sig
@jsmithdev
jsmithdev / sfdx-config.json
Created January 14, 2020 00:13
for putting under /.sfdx/sfdx-config.json to use sfdx
{
"defaultusername": "me@jsmith.dev",
}
@jsmithdev
jsmithdev / Util_Locker.cls
Created November 1, 2019 21:35
Apex: tiny example util for lock / unlock files
//from https://github.com/mshanemc/processBuilderBlocks
public with sharing class Util_Locker {
public static void LockRecord(list<string> recordIds) {
Approval.lock( dedupe(recordIds) );
}
public static void UnLockRecord(list<string> recordIds) {
Approval.unlock( dedupe(recordIds) );
}
@jsmithdev
jsmithdev / LICENSE
Created October 5, 2019 18:23
MIT License
MIT License
Copyright 2019 Jamie Smith
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
<style>
.load-backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.25;
z-index: 1000;
@jsmithdev
jsmithdev / asyncAwaitFunction.js
Last active August 12, 2019 20:24
async await try catch boilerplate function
/**
* @description Some example description
*
* @param {String} example: Another example description
*
* @returns {Object} result: Example of result
*/
async functionName(example){
@jsmithdev
jsmithdev / History|-154f3503|entries.json
Last active July 24, 2022 18:01
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///home/jamie/repo/app-layout/src/modules/main/appLayout/util.js","entries":[{"id":"pDME.js","timestamp":1658087295473},{"id":"MrIP.js","timestamp":1658087353387},{"id":"elBN.js","source":"moved.source","timestamp":1658087372558},{"id":"ySck.js","timestamp":1658087582563},{"id":"Td6n.js","timestamp":1658087623767},{"id":"Jvek.js","timestamp":1658087634477},{"id":"g5XM.js","timestamp":1658087654967},{"id":"N7P5.js","timestamp":1658087738960}]}
@jsmithdev
jsmithdev / flowcmp.cmp
Created June 17, 2019 06:44
Get parameter from URL and pass into a flow via lightning component.
<aura:component implements="lightning:isUrlAddressable,flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.init}"/>
<lightning:flow aura:id="flowData" />
</aura:component>
function createUUID(){
let dt = new Date().getTime()
const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
const r = (dt + Math.random()*16)%16 | 0
dt = Math.floor(dt/16)
return (c=='x' ? r :(r&0x3|0x8)).toString(16)
})