Skip to content

Instantly share code, notes, and snippets.

View paulohenriquesn's full-sized avatar
😀
dotnet new webapi

Paulo Henrique paulohenriquesn

😀
dotnet new webapi
View GitHub Profile
class Address
{
public string City { get; set; }
public string PostalCode { get; set; }
}
class Currency
{
public string Code { get; set; }
@paulohenriquesn
paulohenriquesn / settings.json
Created January 15, 2024 02:01
Visual Studio Code Settings
{
"symbols.hidesExplorerArrows": false,
"workbench.iconTheme": "symbols",
"workbench.colorTheme": "Min Dark",
"editor.fontLigatures": true,
"editor.fontFamily": "JetBrains Mono",
"editor.fontSize": 18,
"editor.lineHeight": 1.8,
"editor.rulers": [
80,
import random
model_training = [
]
tokens = {}
for i in range(0, len(model_training)):
phrase_tokens = model_training[i].split()
#include <DFRobot_ENS160.h>
#include "DFRobot_AHT20.h"
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x38,16,2);
#define I2C_COMMUNICATION
#ifdef I2C_COMMUNICATION
DFRobot_ENS160_I2C ENS160(&Wire, /*I2CAddr*/ 0x53);
== arquivo 1 ==
export namespace CreateRecipientGateway {
export type Input = {
firstName: string
}
export type Output = { id: string }
export interface Contract {
handle(i: Input): Promise<Output>
@paulohenriquesn
paulohenriquesn / eco2.ino
Created November 13, 2023 01:29
eco2 reader
#include <DFRobot_ENS160.h>
#include "DFRobot_AHT20.h"
#define I2C_COMMUNICATION
#ifdef I2C_COMMUNICATION
DFRobot_ENS160_I2C ENS160(&Wire, /*I2CAddr*/ 0x53);
#else
uint8_t csPin = D3;
DFRobot_ENS160_SPI ENS160(&SPI, csPin);
/* eslint-disable @typescript-eslint/ban-ts-comment */
function number_format(number, decimals, decPoint, thousandsSep) {
// eslint-disable-line camelcase
number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
const n = !isFinite(+number) ? 0 : +number;
const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
const sep = typeof thousandsSep === 'undefined' ? ',' : thousandsSep;
const dec = typeof decPoint === 'undefined' ? '.' : decPoint;
let s = '';
(async () => {
const si = require('systeminformation');
const cron = require('node-cron')
let counter = 0;
let Seed = `${new Date().getSeconds()}${new Date().getDate()}`;
//arquivo api.js
import axios from 'axios';
const api = axios.create({
baseURL: "https://min-api.cryptocompare.com"
});
export default api;
//arquivo de request;
<Button variant="contained" id="btnEntrar" style={{
backgroundColor: '#67BF59',
fontSize:25,
fontWeight: 'bold'
}}
color="primary" onClick={() => {
alert('yeah button');
}}>Entrar</Button>
<p style={{zIndex:-1}}>aeaeaesa</p>