Skip to content

Instantly share code, notes, and snippets.

View eduardobatistadev's full-sized avatar


View GitHub Profile
eduardobatistadev / validador.js
Created September 1, 2023 17:40
Validador CPF/CNPJ JS
function validaCpfCnpj(val) {
if (val.length == 14) {
var cpf = val.trim();
cpf = cpf.replace(/\./g, '');
cpf = cpf.replace('-', '');
cpf = cpf.split('');
var v1 = 0;
var v2 = 0;
eduardobatistadev / schedule.class
Created September 1, 2023 17:33
Agendar um Schedule via Developer Console
//Execute o código abaixo no developer console.
// gerador
AccountBatchJobscheduled m = new AccountBatchJobscheduled();
String sch = '0 0 0 ? * * * ';
String jobID = system.schedule('Merge Job', sch, m);
eduardobatistadev / ampscript-integracao-bitly.js
Last active September 1, 2023 21:40 — forked from leto96/SMSDynamicBitlyLink.js
Create Dynamic links using API in Marketing Cloud SMS Send, with AMPScript and Guide Template Language
// Ampscript - Integracao com bitly que encurta URL dinamicamente enviada por SMS.
var @cloudpage, @link, @param, @bitlyPage, @contentType, @content,
@bitlyToken, @additionalHeaderName, @additionalHeaderValue, @request, @response,
set @bitlyToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX' // Your bitly Token
set @bitlyPage = ''
set @contentType = 'application/json'
set @additionalHeaderName = 'Authorization'
eduardobatistadev /
Created April 10, 2021 04:12 — forked from akitaonrails/
Codeminer 42 - BACKEND Test

TRZ (The Resident Zombie) - Backend

Problem Description

The world, as we know it, has fallen into an apocalyptic scenario. The "Influenzer T-Virus" (a.k.a. Twiter Virus) is transforming human beings into stupid beasts (a.k.a. Zombies), hungry to cancel humans and eat their limbs.

You, the last survivor who knows how to code, will help the resistance by deploying a system to connect the remaining humans. This system will be essential to detect new infections and share resources between the members.