localstorage.listAll(); // list all keys
localstorage.getAll(); // get all keys
localstorage.get("key"); // return one value
localstorage.get(["key1", "key2"]); // return object of values
localstorage.save("key", "value"); // save one value
localstorage.save({"key1": "value1", "key2": "value2"}); // save multiple values
localstorage.remove("key"); // remove one 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
{ | |
"AC": { | |
"regiao": "Norte", | |
"estado": "Acre", | |
"cidades": { | |
"1200013": "ACRELÂNDIA", | |
"1200054": "ASSIS BRASIL", | |
"1200104": "BRASILÉIA", | |
"1200138": "BUJARI", | |
"1200179": "CAPIXABA", |
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 search = (list, keyword, options) => { | |
options = (options) ? { ...options } : {}; | |
if (options.caseSensitive === undefined) options.caseSensitive = false; | |
if (options.exactMatch === undefined) options.exactMatch = false; | |
if (options.exactMatch) options.caseSensitive = true; | |
if (options.deepSearch === undefined) options.deepSearch = false; | |
if (options.caseSensitive) keyword = keyword.toString().trim(); | |
else keyword = keyword.toString().trim().toLowerCase(); | |
const sentences = (options.exactMatch) ? [keyword] : keyword.split(" "); |
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
-- Procura a porta que ta presa nessa lista e vê o PID | |
netstat -ano -p tcp | |
-- Mata essa desgraçada | |
taskkill /f /pid [PID] |
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 isJson = (str) => { | |
try { JSON.parse(str); } | |
catch (e) { return false; } | |
} | |
export default localstorage = { | |
listAll: () => Object.keys(localStorage), | |
getAll: () => localstorage.get(localstorage.listAll()), | |
get: (key) => { | |
if (Array.isArray(key)) { |
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
mkdir -p components pages public src styles components/layout components/ui pages/api public/assets public/plugins src/libs src/services | |
touch .env jsconfig.json next.config.js package.json | |
touch pages/_app.jsx pages/_document.jsx pages/index.jsx pages/api/index.js public/manifest.json src/libs/utils.js src/services/api.js styles/global.scss styles/nprogress.scss | |
touch components/layout/.gitkeep components/ui/.gitkeep public/assets/.gitkeep public/plugins/.gitkeep | |
pnpm i next react react-dom nextjs-cors dbwalker axios locutus sass nprogress |
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
{"AC":[{"codigo":"1200013","municipio":"ACRELANDIA"},{"codigo":"1200054","municipio":"ASSIS BRASIL"},{"codigo":"1200104","municipio":"BRASILEIA"},{"codigo":"1200138","municipio":"BUJARI"},{"codigo":"1200179","municipio":"CAPIXABA"},{"codigo":"1200203","municipio":"CRUZEIRO DO SUL"},{"codigo":"1200252","municipio":"EPITACIOLANDIA"},{"codigo":"1200302","municipio":"FEIJO"},{"codigo":"1200328","municipio":"JORDAO"},{"codigo":"1200336","municipio":"MANCIO LIMA"},{"codigo":"1200344","municipio":"MANOEL URBANO"},{"codigo":"1200351","municipio":"MARECHAL THAUMATURGO"},{"codigo":"1200385","municipio":"PLACIDO DE CASTRO"},{"codigo":"1200807","municipio":"PORTO ACRE"},{"codigo":"1200393","municipio":"PORTO WALTER"},{"codigo":"1200401","municipio":"RIO BRANCO"},{"codigo":"1200427","municipio":"RODRIGUES ALVES"},{"codigo":"1200435","municipio":"SANTA ROSA DO PURUS"},{"codigo":"1200500","municipio":"SENA MADUREIRA"},{"codigo":"1200450","municipio":"SENADOR GUIOMARD"},{"codigo":"1200609","municipio":"TARAUACA"},{"codigo":" |
Parte contratante: NOME COMPLETO OU RAZAO SOCIAL (FANTASIA). inscrita no CNPJ/CPF sob o n° CNPJ/CPF, com sede em LOGRADOURO E NÚMERO – BAIRRO, CIDADE (UF) - PAÍS, doravante denominada CONTRATANTE, neste instrumento representada, de acordo com o seu ato constitutivo, pelo NOME COMPLETO DO REPRESENTANTE, documento n° CPF, e Parte contratada: O Desenvolvedor NOME COMPLETO OU RAZAO SOCIAL (FANTASIA), inscrito no CPF/CNPJ sob o nº CPF/CNPJ, residente domiciliado em LOGRADOURO E NÚMERO – BAIRRO, CIDADE (UF) - PAÍS, doravante denominada CONTRATADA.
O presente contrato tem por objeto regular as condições mediante as quais a CONTRATADA prestará à CONTRATANTE os serviços discriminados na CLÁUSULA SEGUNDA, com fornecimento de mão de obra.
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
{ | |
"Next Routes handler": { | |
"prefix": [ | |
"nexthandler", | |
"handler" | |
], | |
"body": [ | |
"export default async function (req, res) {", | |
" console.clear();", | |
" console.log(`${req.method} ${req.url}`);", |
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
export const isSet = (value) => (value !== undefined && value !== null); | |
export const isEmpty = (value) => ( | |
(Array.isArray(value) && value.length === 0) | |
|| (typeof value === "object" && Object.keys(value).length === 0) | |
|| (typeof value === "string" && value.trim().length === 0) | |
|| (typeof value === "number" && isNaN(value)) | |
|| value === undefined | |
|| value === null | |
); |
NewerOlder