This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Caso tenha problema de lock files: | |
abra o WSL e rode: | |
sudo e2fsck /dev/sdb -y | |
sudo e2fsck /dev/sdb -p | |
abra PowerShell e restarte o wsl: | |
wsl --shutdown | |
Caso persista, repita os passos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @template {keyof HTMLElementTagNameMap} K | |
* @param {K} elementTag | |
* @param {HTMLElementTagNameMap[K]} options | |
* @returns {HTMLElementTagNameMap[K]} | |
*/ | |
export function createElement(elementTag, options = {}) { | |
const element = document.createElement(elementTag); | |
Object.entries(options).forEach(([key, value]) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { css } from "styled-components"; | |
const breakpoints = { | |
xs: "480px", | |
sm: "768px", | |
md: "992px", | |
lg: "1200px" | |
}; | |
type cssParams = Parameters<typeof css>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function maskCPF(element = new HTMLInputElement()) { | |
let cpfAtualizado; | |
const inputCpf = element; | |
const cpfAtual = element.value; | |
cpfAtualizado = cpfAtual.replace( | |
/(\d{3})(\d{3})(\d{3})(\d{2})/, | |
(_regex, one, two, three, four) => `${one}.${two}.${three}-${four}`, | |
); | |
inputCpf.value = cpfAtualizado; | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Sequelize = require("sequelize"); | |
const { | |
database: { name, user, password, host, dialect }, | |
} = require("../config/config.js"); | |
const sequelize = new Sequelize(name, user, password, { | |
host, | |
dialect, | |
}); | |
module.exports = sequelize; |