Skip to content

Instantly share code, notes, and snippets.

View eemr3's full-sized avatar

Emerson Moreira eemr3

View GitHub Profile
@eemr3
eemr3 / index.html
Created February 21, 2024 19:20
Template para envio de email
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta name="x-apple-disable-message-reformatting" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta content="telephone=no" name="format-detection" />
@eemr3
eemr3 / validaCNPJ.js
Created December 8, 2023 18:43
Vlida CNPJ (JS)
function validaCNPJ (cnpj) {
var b = [ 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2 ]
var c = String(cnpj).replace(/[^\d]/g, '')
if(c.length !== 14)
return false
if(/0{14}/.test(c))
return false
@eemr3
eemr3 / validaCNPJ.ts
Created December 8, 2023 18:42
Validar CNPJ (TS)
export function ValidaCNPJ(cnpj: string): boolean {
const b: number[] = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
const c: string = cnpj.replace(/[^\d]/g, '');
if (c.length !== 14) {
return false;
}
if (/0{14}/.test(c)) {
return false;
@eemr3
eemr3 / daily_movements.service.ts
Created October 23, 2023 21:58
Service do DailyMoviments do APP Mariah
import { Injectable } from '@nestjs/common';
import { PrismaService } from '../database/prisma/prisma.service';
import { UpdateDailyMovementDto } from './dto/update-daily_movement.dto';
import { CreateDailyMovementDto } from './dto/create-daily_movement.dto';
@Injectable()
export class DailyMovementsService {
constructor(private prisma: PrismaService) {}
async create(createDailyMovementDto: CreateDailyMovementDto) {
const initialDate = new Date(createDailyMovementDto.initialDate);
@eemr3
eemr3 / graphql-queries-mutations.md
Created September 28, 2023 03:03 — forked from bradtraversy/graphql-queries-mutations.md
GraphQL Queries & Mutations

GraphQL Queries & Mutations

These are the GraphQL queries and mutations for the YouTube course.

Get names of all clients

{
  clients {
    name
 }
@eemr3
eemr3 / config.json
Last active June 6, 2024 12:33
Config VS Code - Emerson Moreira
{
"editor.fontFamily": "Fira code",
"editor.fontLigatures": true,
"editor.fontSize": 16,
"workbench.colorTheme": "Omni",
"editor.rulers": [80, 100],
"editor.formatOnSave": true,
"editor.tabSize": 2,
// "editor.formatOnPaste": true,
"[css]": {
@eemr3
eemr3 / settings.json
Created December 15, 2022 14:22 — forked from diego3g/NODE.md
VSCode Settings (Updated)
{
"emmet.syntaxProfiles": {
"javascript": "jsx"
},
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
@eemr3
eemr3 / tsconfig.json
Last active September 13, 2022 22:26
Configuração para o TypeScript no NodeJs
{
"compilerOptions": {
"target": "es2018",
"lib": [
"es5",
"es6",
"ES2018"
],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
@eemr3
eemr3 / .zshrc
Created May 13, 2022 17:45
Arquivo zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@eemr3
eemr3 / .sequelizerc
Last active September 13, 2022 22:27
Configuração do dot sequelizerc
const path = require('path');
module.exports = {
config: path.resolve('src', 'database', 'config', 'config.js'),
'models-path': path.resolve('src', 'database', 'models'),
'seeders-path': path.resolve('src', 'database', 'seeders'),
'migrations-path': path.resolve('src', 'database', 'migrations'),
};