Skip to content

Instantly share code, notes, and snippets.

View VicccccW's full-sized avatar

Victor Wang VicccccW

View GitHub Profile
@paulroth3d
paulroth3d / LightningSafeNavigation.js
Last active April 27, 2022 07:17
Lightning Safe Navigation
/*global sforce console $A window */
/*eslint no-console: "off"*/
/**
* Utility Scripts for common navigation patterns.
**/
this.LightningSafeNavigation = {};
/**
@booleangate
booleangate / a-salesforce-oauth-2.0-jwt-bearer-token-flow-walk-through.md
Last active July 19, 2024 17:51
Salesforce OAuth 2.0 JWT Bearer Token Flow walk-through

Salesforce OAuth 2.0 JWT Bearer Token Flow Walk-Through

This document will walk you through how to create or configure a Salesforce application for use with JWT authentication. These configuration steps and the example code works as of Salesforce API version 42.0.

Prerequisites

Create an RSA x509 private key/certification pair

@cassaram09
cassaram09 / deepClone.js
Last active October 12, 2021 06:22
JavaScript deep clone function
function deepClone(source){
// If the source isn't an Object or Array, throw an error.
if ( !(source instanceof Object) || source instanceof Date || source instanceof String) {
throw 'Only Objects or Arrays are supported.'
}
// Set the target data type before copying.
var target = source instanceof Array ? [] : {};
for (let prop in source){
@laterbreh
laterbreh / Express 4 and Socket.io: Passing socket.io to routes - app.js
Last active August 15, 2023 13:58
Express 4 and Socket.io: Passing socket.io to routes.
var app = express();
app.io = require('socket.io')();
var routes = require('./routes/index')(app.io);
app.use('/', routes);