Skip to content

Instantly share code, notes, and snippets.

View Stwissel's full-sized avatar

Stephan H. Wissel Stwissel

View GitHub Profile
@Stwissel
Stwissel / README.md
Last active April 26, 2019 04:36
Custom Action for Salesforce Marketing Cloud

Marketing Cloud Custom Action

The flow provides a boilerplate to create a custom action for consumption in Salesforce Marketing Cloud. The flow outputs the data received from marketing cloud in a debug node. So you need to add whatever you want to do at the level of that debug node

Setup

  • You need to open the the Test JWT node and edit the secret. Better: remove it and set the environment variable as described in the node's documentation
  • the endpoint path is /endpoints/demo. If you want to change that you need to edit 2 nodes: config.json and Action Node

Feedback

@Stwissel
Stwissel / SalesforceObjectKeys.json
Created March 20, 2019 02:53
Objects Keys Salesforce Spring 19
{
"100": "UserLicense",
"110": "ObjectPermissions",
"500": "Case",
"501": "Solution",
"570": "LiveChatTranscript",
"571": "LiveChatVisitor",
"572": "LiveChatDeployment",
"573": "LiveChatButton",
"574": "QuickText",
@Stwissel
Stwissel / Excel2package.xslt
Last active February 23, 2019 07:51
Sample XSLT to generate a package.xml file for Salesforce ANT tool to remove dead fields
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns="http://soap.sforce.com/2006/04/metadata" exclude-result-prefixes="xs xd" version="2.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<xsl:param name="fieldNameColumn" select="'0'"/>
<xsl:param name="statusColumn" select="'5'"/>
<xsl:param name="isDeletable" select="'yes'"/>
@Stwissel
Stwissel / Validations-interactive.xslt
Last active February 8, 2019 02:37
XSLT Stylesheet to report on Validation formulas in Salesforce
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xs xd"
version="2.0">
<xsl:output method="html" omit-xml-declaration="yes" use-character-maps="no-control-characters"/>
<xsl:template match="/">
@Stwissel
Stwissel / ValidationReportGenerator.java
Last active February 7, 2019 16:16
Extract validation relevant files from object meta data files
/** ========================================================================= *
* Copyright (C) 2019 Salesforce Inc ( http://www.salesforce.com/ . *
* All rights reserved. *
* *
* @author Stephan H. Wissel (stw) <swissel@salesforce.com> *
* @notessensei *
* @version 1.0 *
* ========================================================================== *
* *
* Licensed under the Apache License, Version 2.0 (the "License"). You may *
@Stwissel
Stwissel / stackoverflow.js
Created September 15, 2018 09:28
Simple nodeJS function to crash with a stackoverflow
/* This program will use a recursion to provoke a stackoverflow
use it at your own risk. It might take more than the runtime down.
*/
const looper = function(instanceCount) {
console.log(
`Calling instance ${instanceCount} with ${process.memoryUsage().heapUsed}`
);
var body = '';
for (var i = 0; i < 1000000; i++) {
@Stwissel
Stwissel / Json2XmlMain.java
Last active March 1, 2018 06:38
Json to XML and Back with vert.x
package net.wissel.json2xml;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
@Stwissel
Stwissel / burnchart.html
Created November 14, 2017 10:26
Sample burnchart with D3JS
<!DOCTYPE html>
<html>
<head>
<title>Burn baby burn</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<style type="text/css">
.chart {
border: 1px solid black;
}
@Stwissel
Stwissel / sgspeedtest.sh
Created July 22, 2017 10:23
Command line speed Test for Singapore
#!/bin/bash
# Linux or Mac shell script to test download speeds in Singapore
# using the speedtest CLI https://github.com/sivel/speedtest-cli
# VERY quick and dirty
resultfile=speedresult.asc
speedparam='--secure --simple --server '
date >> $resultfile
echo 2054 Viewqwest Pte Ltd Singapore, Republic of Singapore [12.77 km]
echo 2054 Viewqwest Pte Ltd Singapore, Republic of Singapore [12.77 km] >> $resultfile
speedtest $speedparam 2054 >> $resultfile
@Stwissel
Stwissel / keybase.md
Created December 27, 2016 08:26
Keybase identity claim

Keybase proof

I hereby claim:

  • I am stwissel on github.
  • I am stwissel (https://keybase.io/stwissel) on keybase.
  • I have a public key whose fingerprint is DF99 5261 9EC4 F46C EAB4 AB56 5FB7 DEAC CD7C E989

To claim this, I am signing this object: