Skip to content

Instantly share code, notes, and snippets.

View eduardobatistadev's full-sized avatar
🎯
Concentrando

EDUARDO JOSE ABRANTES BATISTA eduardobatistadev

🎯
Concentrando
View GitHub Profile
@eduardobatistadev
eduardobatistadev / validador.js
Created September 1, 2023 17:40
Validador CPF/CNPJ JS
View validador.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
eduardobatistadev / schedule.class
Created September 1, 2023 17:33
Agendar um Schedule via Developer Console
View schedule.class
//Execute o código abaixo no developer console.
// gerador http://www.cronmaker.com/?1
AccountBatchJobscheduled m = new AccountBatchJobscheduled();
String sch = '0 0 0 ? * * * ';
String jobID = system.schedule('Merge Job', sch, m);
@eduardobatistadev
eduardobatistadev / ampscript-integracao-bitly.js
Last active September 1, 2023 21:40 — forked from leto96/SMSDynamicBitlyLink.js
Create Dynamic links using Bit.ly API in Marketing Cloud SMS Send, with AMPScript and Guide Template Language
View ampscript-integracao-bitly.js
// Ampscript - Integracao com bitly que encurta URL dinamicamente enviada por SMS.
%%[
var @cloudpage, @link, @param, @bitlyPage, @contentType, @content,
@bitlyToken, @additionalHeaderName, @additionalHeaderValue, @request, @response,
@message
set @bitlyToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX' // Your bitly Token
set @bitlyPage = 'https://api-ssl.bitly.com/v4/bitlinks'
set @contentType = 'application/json'
set @additionalHeaderName = 'Authorization'
@eduardobatistadev
eduardobatistadev / BACKEND.md
Created April 10, 2021 04:12 — forked from akitaonrails/BACKEND.md
Codeminer 42 - BACKEND Test
View BACKEND.md

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.

Requirements