image post

How to connect to a MySQL database in Node.js

Posted on Oct 12, 2021
To connect to a MySQL database in Node.js is pretty straightforward with the module mysql2.

image post

Node.js Express Mysql stack deployed on Heroku

Posted on Oct 09, 2021
Let's build a Rest API from scratch that uses a MySQL database. We are going to use Node.js and Express as a framework to generate some scaffolding for our Rest API

image post

Node.js and typescript project template

Posted on Oct 08, 2021
A project template with typescript, jest and linter among others configurations

image post

This is most likely not an error with the salesforce cli

Posted on Oct 07, 2021
Error authenticating with auth code due to: grant type not supported

image post

Ubiquiti Unifi factory reset

Posted on Sep 18, 2021


image post

Prettier config

Posted on Sep 09, 2021
With Prettier you will be able to define your own rules, however default rules are enough at the beginning.

image post

Sitemap xml creation

Posted on Sep 09, 2021
No matter the language you are using in your site, this is the right way to create a sitemap.


image post

flexsearch example

Posted on Sep 09, 2021
flexsearch It's an awesome package to index in-memory data



image post

Count business hours in a Spreadsheet

Posted on Sep 06, 2021

image post

javascript lazy load images

Posted on Aug 31, 2021
javascript lazy load images

image post

redis delete all keys

Posted on Aug 31, 2021
redis delete all keys

image post

redis delete all keys with prefix

Posted on Aug 31, 2021
redis delete all keys with prefix

image post

error authenticating with auth code due to: grant type not supported

Posted on Aug 31, 2021
error authenticating with auth code due to: grant type not supported

image post

Salesforce integration with AWS AppFlow, S3, Lambda and SQS

Posted on Aug 24, 2021
There are many ways to sync up our Salesforce data with third parties. One option is a mix of Salesforce and AWS services, specifically Change Data Capture from Salesforce and AppFlow from AWS.


image post

Mock AWS SDK with Jest in TypeScript

Posted on Jul 31, 2021
It's a fact: you will spend some time writing mocks and slow down the development process but in the other hand unit test will run faster with less configuration.


image post

How to trigger a Lambda Function from S3

Posted on Jun 20, 2021
Using Cloudformation to declare a Lambda Function and an S3 bucket

image post

Magic Mover for Notes And Attachments to Lightning Experience

Posted on May 22, 2021
Files are more versatile and provide better functionality than attachments. Attachments can only be attached to a single record, while files...

image post

How to create files in Salesforce for testing purposes

Posted on May 21, 2021
Fortunately, dealing with files in Salesforce in a unit text context, is pretty easy.

image post

How to make Load and Smoke testing with Artillery

Posted on May 20, 2021
Artillery is a modern load testing and smoke testing solution designed for cross-functional teams that run microservice-based systems on AWS and rely on CI/CD to ship at high velocity

image post

How to render HTML in Jade

Posted on 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

Posted on 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 write to S3 bucket from Lambda function

Posted on May 12, 2021
Let's create a SAM template to declare a Lambda function to write into an S3 bucket

image post

How to trigger a Lambda with a SQS message

Posted on 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 publish a message in SQS from SNS

Posted on May 10, 2021
A CloudFormation template example about how to create an SNS topic to publish a message in SQS in the AWS wolrd

image post

Protect your social networks with two-factor authentication

Posted on Apr 29, 2021
Nowadays a super complex password is not enough to avoid being hacked. In fact, most of the times your password is not guessed by brutal force (try until it works).

image post

SFDX - Error authenticating with auth code due to: grant type not supported

Posted on Apr 27, 2021
Error authenticating with auth code due to: grant typw not supported. This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again

image post

How to setup Github Actions workflow lint

Posted on Apr 25, 2021
How to setup Github Actions workflow lint

image post

How to download a Salesforce file from Node.js

Posted on Apr 20, 2021
Download a file from Salesforce using Node.js

image post

How to download a file from Salesforce using Java Rest API

Posted on 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

Posted on Apr 16, 2021
Listening to changes in a Lightning Component from record changes

image post

Download Salesforce metadata using SFDX

Posted on Feb 23, 2021
Download Salesforce metadata using SFDX

image post

Salesforce - Mock callouts in Apex

Posted on Feb 19, 2021
Tests callouts in Apex

image post

DB schema updates with knex in Node.js

Posted on Feb 06, 2021
Knex is a query builder and among other things, it's an awesome tool to run DB migrations to create tables and modify them as you usually do with SQL scripts

image post

How to send a message to AWS SQS queue from Salesforce Apex class

Posted on Jan 31, 2021
How to post a message in an AWS SQS queue from an Apex class in Salesforce

image post

Mock Axios with Jest

Posted on Jan 31, 2021
Mock Axios with Jest using successful and error response

image post

P2: the collaboration tool from WordPress

Posted on Sep 02, 2020
As communication moves increasingly online, staying organized can be a challenge. The way we work at WordPress.com is unique.

image post

Mysql full text search (search related data)

Posted on Sep 01, 2020
Search related data in Mysql it's pretty easy

image post

Dealing with concurrency in Node.js

Posted on 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

Posted on Aug 30, 2020
Sometimes you need a dependency that is not published as a regular package at npmjs.com

image post

Do you really need a mobile app?

Posted on Aug 30, 2020
I see lots of brands advertising "Hey, download our mobile app and…"

image post

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

Posted on Aug 30, 2020
What about if we add a component with a pie chart on the Campaign object’s record page?

image post

Dealing with customers

Posted on Aug 30, 2020
A post wrote by Jozsef Torsan that I would like to share here.

image post

Salesforce client for an Apex RESTful web service

Posted on Aug 29, 2020
An example about how to consume a Salesforce api rest

image post

Define environment variables in Tomcat

Posted on 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

Posted on 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

Posted on Aug 28, 2020
A simple JavaScript method that removes all new lines and multiple spaces (including tab spaces) by a single space

image post

Improve pg-promise stack traces

Posted on Aug 27, 2020
When you execute a query with error, we get a pg-promise internal module-specific stack trace.

image post

How to use node-cache to accelerate queries

Posted on Aug 25, 2020
Database access is usually expensive so you should optimize roundtrips as much as possible.

image post

Search columns in Postgres

Posted on Aug 25, 2020
A simple query to search columns in different schemas

image post

Get all tables in Redshift

Posted on Aug 23, 2020
Get all tables from a given schema

image post

pg-promise self signed certificate error in Postgres

Posted on 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

Posted on Aug 18, 2020
How to install Postgres database in your MacOS local machine

image post

Install and run Redis locally

Posted on Aug 18, 2020
How to install and run Redis in your local machine

image post

Load stylesheets in background to increase page speed

Posted on Aug 16, 2020
Optimize the page loading time by loading your style sheets in background.

image post

Lazy load images with javascript

Posted on Aug 12, 2020
Why should you load your images in a lazy way?

image post

5 reasons to host your images on Cloudinary

Posted on Aug 12, 2020
Image and video management are present in almost all of our projects. I would like to share my experience with this.

image post

How to connect to a Redshift database from Node.js

Posted on Aug 11, 2020
A util piece of code to connect to a Redshift database

image post

Bye bye FindBugs. Hello SpotBugs

Posted on Aug 08, 2020
I used to use FindBugs plugin in my Java projects to detect and learn about issues and potential issues in my source code.

image post

Cache implementation in Node.js

Posted on Aug 08, 2020
A cached value it’s dynamic data, expensive to calculate, that we make it constant during a period of time.

image post

Get Visualforce usage stats from VisualforceAccessMetrics

Posted on Aug 08, 2020
If you want to know how frequently your Visualforce pages are accessed, you just have to run a simple query on VisualforceAccessMetrics

image post

How to build a sitemap

Posted on Aug 08, 2020
A sitemap is very important if you want to search engines discover and index your site properly.

image post

Configure Prettier in your Node JS project

Posted on Aug 08, 2020
Prettier is a code formatter that supports many languages and can be integrated with most of the editors

image post

Delete all keys by a prefix in Redis cluster

Posted on Aug 04, 2020
Delete all the keys by a given prefix in a Redis cluster.

image post

How to configure http auth basic in Node js and Express

Posted on Aug 04, 2020
Let’s build a small site in Node.js using Express that will have one protected page

image post

Full-text search in Node JS - search related data

Posted on Aug 04, 2020
If you are building a website, e-commerce, a blog, etc., you will need a full-text search to find related content like Google does for every web page.

image post

Better Queue in Node JS

Posted on Aug 03, 2020
A good practice in software development is to delegate as much heavy work as possible to background jobs to avoid blocking the main execution of your application that can be a web app, mobile app, or desktop.

image post

Optimizing Node JS code

Posted on Aug 03, 2020
At different levels you might optimize your JavaScript code. Sometimes optimization is a matter of good practices such as avoid using logging in loops.

image post

Customize styles highlight.js

Posted on Aug 02, 2020
Customize styles highlight.js

image post

Hash text in Node.js

Posted on Aug 02, 2020
Hash a string in Node.js without extra dependencies

image post

5 reasons to choose WordPress as your content management tool

Posted on Jul 31, 2020
As Engineer I installed WordPress many times, facing issues such as performance and security. When you host WordPress by your own...

image post

Template of Java web and Heroku

Posted on Jul 31, 2020
I’ve worked in several projects with Java, specially Java web using Tomcat as a web container and then Glassfish as application server.

image post

Why I adopted Heroku

Posted on Jul 31, 2020
Heroku is a platform as a service (PaaS)

image post

Upload big files to S3 using Node.js

Posted on Jul 29, 2020
Sometimes you need to upload a big file, let say bigger than 100MB. Stream from disk must be the approach to avoid loading the entire file into memory.

image post

How to connect to a PostgreSQL database in Node.js

Posted on Jul 28, 2020
A simple example about how to connect to a PostgreSQL database using Node.js

image post

Compress a file in Node.js

Posted on Jul 27, 2020
Zip a file in Node.js it's easy using zlib

image post

How to configure HTTPS in Node.js

Posted on Jul 27, 2020
Sometimes we need to configure a secure environment locally to test how our application reacts to HTTPS.

image post

Test Driven Development (TDD) in a nutshell

Posted on Jul 24, 2020
Every project has somewhere in the src folder a file called utils.js, Utils.java, utils.py, etc....

image post

Migrate sforce.connection.query to Lightning equivalent

Posted on Jun 18, 2020
As you probably know, JavaScript buttons are not supported in Lightning Experience (LEX). In particular, you can’t use REQUIRESCRIPT. In this post, the idea is to show how to migrate a particular JavaScript button that uses sforce.connection.query sentence.

image post

How to convert sforce.apex.execute to Lightning

Posted on Jun 18, 2020
Let’s see how to convert a Salesforce JavaScript button that uses sforce.apex.execute in to Lightning Experience. The good news is you will reuse this code and the approach for all your similar buttons.

image post

Migrate $User, $Profile, $Label and $Api to Lightning Components

Posted on Jun 18, 2020
We can’t use $User, $Profile, $Label and $Api in Lightning. We need to implement a server-side solution.

image post

How to build a sitemap xml in Node js using Express

Posted on Jun 17, 2020
A good sitemap.xml will help you a lot in terms of SEO. It’s a nice starting point if you want to index your site. It’s just a standard XML file that search engines understand.

image post

Redirect all requests from HTTP to HTTPS in Node.js and Express

Posted on Jun 15, 2020
The first step will be to create a method to guess if the HTTP request comes from HTTP or HTTPS (secure or not secure). In some context like AWS or Heroku you will have to ask by the header x-forwarded-proto instead of req.secure.

image post

About

Posted on Jun 02, 2020
About Andres Canavesi.