Skip to content

Instantly share code, notes, and snippets.

@jkentjnr
jkentjnr / SystemPermissionUtility.cls
Created July 7, 2016 10:28
Salesforce Apex: Check for permission (both User and Permission Sets)
public without sharing class SystemPermissionUtility {
// The permissions required by the application.
private static List<String> getPermissionList() {
return new List<String>{
'PermissionsApiEnabled',
'PermissionsModifyAllData'
};
}
@jkentjnr
jkentjnr / braintreeResponseCodes.json
Last active February 17, 2021 12:35
Braintree Response Codes (Nov 2016) in JSON format
// Taken from https://developers.braintreepayments.com/reference/general/validation-errors/all/node
// Processed from tables to JSON using http://convertjson.com/html-table-to-json.htm
// Please note: Braintree will typically return the appropriate error codes & messages if an error occurs.
{
"81501": {
"message": "Amount cannot be negative.",
"description": "Even if creating a credit transaction, the amount should be given as x.xx, not -x.xx."
},
@jkentjnr
jkentjnr / readme.md
Last active May 24, 2017 00:42
My Rules for Product Development - Software

My Rules for Product Development - Software

Does the product make less than $10K per customer annually?

If so, you need a large marketing budget - think seven digits. And probably read no further - find someone else who has been successful in this space.

Do you have expertise in the industry you are developing a product for?

Short answer: you need to know what you are working with and need an expert and/or a trusted identity in the space you are developing a product.

@jkentjnr
jkentjnr / I18n.json
Created November 29, 2017 22:54
Example of an I18n file
{
"en": {
"inputText": {
"title": {
"label": "Title of the text",
"placeholder": "Title",
}
}
},
"es": {
# Not finished .. in prog
# Update Grub commandline props.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_rev_override=5 enable_fbc=1 enable_psr=1 disable_power_well=0 pci=noaer pcie_aspm=force nmi_watchdog=0"
@jkentjnr
jkentjnr / nlauth.js
Created August 3, 2018 02:15
Netsuite Restlet 2.0 Hello World
const request = require('request');
const headers = {
"Authorization": "NLAuth lauth_account=4878491_SB1,[email protected],nlauth_signature=#####,nlauth_role=1006",
"Content-Type": "application/json",
"Accept": "application/json"
};
function callback(error, response, body) {
console.log(error, body);
@jkentjnr
jkentjnr / readme.md
Created August 28, 2018 10:28
SVG Product Configurator Overview

We are looking for an experienced developer to build and deliver a website for a customer. This organisation works with businesses, clubs, sports clubs, etc to deliver customised clothing. They are looking for the ability for configure the clothes online using SVG. A good example of how this can be done can be viewed here: http://www.reformclothing.com/us/design-your-own/custom-varsity-jacket

See the tech / specifications below:

We will provide a template or a design than will need to be configured to work with React, etc.

Milestones:

@jkentjnr
jkentjnr / README.md
Last active May 14, 2019 11:56
Campaign Setup Steps

Grassrootz Setup Steps


  • Create a campaign at Grassrootz

This will ensure the campaign is pushed to Salesforce. At this point, you will need to configure your campaign. Navigate to the newly created campaign in Salesforce.

  • Rename the campaign if so desired.
  • Configure the Start and End dates for the Campaign
@jkentjnr
jkentjnr / graphBuilder.apex
Created October 14, 2019 12:38
Graphql Builder for Salesforce Apex
public class GraphBuilder {
/*
EXAMPLE
-------
String q = new GraphBuilder.QueryOperation(
new GraphBuilder.QueryResolver(
'notification',
resource "aws_api_gateway_method" "graphRoot" {
rest_api_id = aws_api_gateway_rest_api.api.id
resource_id = aws_api_gateway_resource.graphRoot.id
http_method = "POST"
authorization = "COGNITO_USER_POOLS"
authorizer_id = aws_api_gateway_authorizer.cognito.id
}
resource "aws_api_gateway_integration" "graphRoot" {
rest_api_id = aws_api_gateway_rest_api.api.id