Skip to content

Instantly share code, notes, and snippets.

View almcarvalho's full-sized avatar

Lucas Carvalho almcarvalho

View GitHub Profile
if (user) {
if (user.dataVencimento) {
const diferencaEmMilissegundos = new Date().getTime() - user.dataVencimento.getTime();
const diferencaEmDias = Math.floor(diferencaEmMilissegundos / (1000 * 60 * 60 * 24));
console.log("atraso: " + diferencaEmDias);
if (diferencaEmDias > 10) {
warningMsg = `seu plano está bloqueado, entre em contato com o setor financeiro!`
}
}
}
import { create } from 'venom-bot';
import { stages, getStage } from './stages.js';
var pessoas = [];
create({
session: 'store',
multidevice: true,
headless: false,
})
//INTEGRAÇÃO PIX VÍDEO 2- Efí, antiga Gerencianet
var valorDoPix = 0;
var valorAux = 0;
app.get("/rafael", async (req, res) => {
if (valorDoPix > 0) {
valorAux = valorDoPix;
valorDoPix = 0;
import cors from 'cors';
import express from 'express';
require('dotenv').config();
const PORT: string | number = process.env.PORT || 5000;
const app = express();
app.use(cors());
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClientSecureBearSSL.h>
// Replace with your network credentials
const char* ssid = "teste";
const char* password = "teste123";
const int led1 = 2;
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClientSecureBearSSL.h>
// Replace with your network credentials
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
void setup() {
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
const char* ssid = "yourNetworkName";
const char* password = "yourNetworkPassword";
void setup () {
Serial.begin(115200);
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
#include <Arduino_JSON.h>
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
//Your Domain name with URL path or IP address with path
const char* serverName = ""https://fit2sell.herokuapp.com/rafael"";
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
const char* ssid = "SERVER NAME";
const char* password = "SERVER PASSWORD";
void setup()
{
Serial.begin(115200);
/*
* ESP8266 JSON Decode of server response
* -Manoj R. Thkuar
* https://circuits4you.com
*/
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>