dev

image post

How to create files in Salesforce for testing purposes

ContentVersion and ContentDocumentLink creation from Apex
Andrés Canavesi - May 21, 2021
Fortunately, dealing with files in Salesforce in a unit text context, is pretty easy.

image post

How to render HTML in Jade

Jade is a Node.js template engine that uses indentation as part of the syntax
Andrés Canavesi - May 15, 2021
By default, Jade buffers the output so we have to be explicit when we want unbuffered code

image post

Download and save a file in Node.js

Get a file from a server and store it in your disk
Andrés Canavesi - May 13, 2021
Download a file in Node.js is pretty straightforward. We are going to make an implementation using native modules. No third parties.

image post

How to trigger a Lambda with a SQS message

AWS SAM template to execute a Lambda Function by writing a message in a SQS queue. Cloudformation world
Andrés Canavesi - May 12, 2021
Let's create a SAM template to declare a Lambda function to be triggered from an SQS message

image post

How to setup Github Actions workflow lint

Configure a workflow to execute your linter when pushing code
Andrés Canavesi - Apr 25, 2021
How to setup Github Actions workflow lint

image post

How to download a file from Salesforce using Java Rest API

A Java snippet to download a Salesforce file through the Rest API
Andrés Canavesi - Apr 20, 2021
Let say we want to download a file stored in Salesforce. We'll have to deal with ContentVersion

image post

Detect record changes in a Lightning Component

Listen to events when a record changes outside your Lightning component
Andrés Canavesi - Apr 16, 2021
Listening to changes in a Lightning Component from record changes

image post

Salesforce - Mock callouts in Apex

How to use mockups to tests callouts in Apex
Andrés Canavesi - Feb 19, 2021
Tests callouts in Apex

image post

Mysql full text search (search related data)

Search related data in MySQL easily using Match and Against
Andrés Canavesi - Sep 01, 2020
Search related data in Mysql it's pretty easy

image post

Dealing with concurrency in Node.js

Yeap, race condition is present also in Node.js regardless the single thread Event Loop
Andrés Canavesi - Aug 30, 2020
Even though the Event Loop is a single thread we have to take care of race condition since 99% of our code will run in a non main thread.

image post

How to use a GitHub repository as a dependency in Node.js

Andrés Canavesi - Aug 30, 2020
Sometimes you need a dependency that is not published as a regular package at npmjs.com

image post

How to add a pie chart in Campaign’s record page in Salesforce

Add a cool chart in a record page easily. No code.
Andrés Canavesi - Aug 30, 2020
What about if we add a component with a pie chart on the Campaign object’s record page?

image post

Salesforce client for an Apex RESTful web service

Expose a Rest service from an Apex class using RestResource annotation
Andrés Canavesi - Aug 29, 2020
An example about how to consume a Salesforce api rest

image post

Define environment variables in Tomcat

Andrés Canavesi - Aug 29, 2020
Sometimes you want to change the behavior of your code without recompiling or deploying.

image post

Detect if a string is a number with regex

Andrés Canavesi - Aug 28, 2020
How to know if a string is a number in JavaScript using a regular expression

image post

Clean up more than two spaces and new lines with regex

A simple JavaScript method that removes all newlines and multiple spaces from a given text
Andrés Canavesi - Aug 28, 2020
A simple JavaScript method that removes all new lines and multiple spaces (including tab spaces) by a single space

image post

Search columns in Postgres

Andrés Canavesi - Aug 25, 2020
A simple query to search columns in different schemas

image post

Get all tables in Redshift

Andrés Canavesi - Aug 23, 2020
Get all tables from a given schema

image post

pg-promise self signed certificate error in Postgres

To fix this issue you have to use the package with the following recommendations
Andrés Canavesi - Aug 20, 2020
If you are using Node.js with some of these packages: pg-promise or pg probably you are facing this issue.

image post

Install Postgres locally in MacOS

Install using Brew package manager
Andrés Canavesi - Aug 18, 2020
How to install Postgres database in your MacOS local machine