Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Danilo Silva danilosilvadev

🎯
Focusing
View GitHub Profile
View interview_questions.md

Advanced Interview questions

Axios interceptor, fetchAPI

Lazyload, suspense, placeholder component

Errorbondarie

Webworker

LocalStorage, sessionStorage, indexDb

Auth token?, refreshToken, access token

Devtools profileID, audits, reduxtools, profiler

PWA Service worker

View cnpj_validation.js
const cnpj = (value) => {
console.log(value, 'o valor q entrou')
var cnpj = value.replace(/[^\d]+/g,'');
// cnpjs inválidos conhecidos
const numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
for(i of numbers) {
if (i.repeat(14) === cnpj) { return false}
}
View AwesomeGIT.md

Rules:

  1. Ser DESCRITIVO, nada de links apenas, tem que ter resumo das tasks e serem numeradas. Links são info adicionais não o escopo da task.

  2. Export do requestly anexado se tiver que usá-lo.

  3. Link de onde testar SEMPRE, e se em mais de um lugar. Link completo de tds eles.

  4. Info adicional em casos diferentes que necessitem de algo a mais.

  5. Quaisquer mudanças ou alterações discutidas em comentários DEVEM SER ACRESCENTADAS na descrição do PR, não é bom gastarmos tempo lendo tds os comentários em tds os sites q a pessoa discutiu o PR.

View thePerfectPackage.json
{
"name": "@bluefoot/mirch",
"version": "0.1.0",
"private": true,
"dependencies": {
"@babel/preset-env": "^7.0.0",
"@bluefoot/ymir": "^0.3.8",
"axios": "^0.18.0",
"html-react-parser": "^0.6.1",
"husky": "^1.3.1",
@danilosilvadev
danilosilvadev / email-validation.js
Last active Aug 16, 2018
# Settle of things to use in an utils folder + a form validated
View email-validation.js
const emailValidation = email => /\S+@\S+\.\S+/.test(email) ? true : false;
export default emailValidation
@danilosilvadev
danilosilvadev / VSCODE.md
Last active Oct 11, 2019
deuMerda é um gist para caso eu precise reinstalar o ubuntu e suas dependências.
View VSCODE.md

Plugins

  • eslint
  • tslint
  • prettier
  • spotify
  • zen tabs
  • string manipulation
  • jupyter notebook
  • python
View index.html
<header class="header">
<button class="open_menu">Open</button>
<div class="logo">Logo</div>
<nav class="nav">
<ul class="main_menu">
<a href="#">
<li>Option1</li>
</a>
<a href="#">
<li>Option2</li>
@danilosilvadev
danilosilvadev / .babelrc
Created Oct 16, 2017
Webpack config 2017
View .babelrc
{
"presets": ["es2015", "react"],
"plugins": [
["transform-class-properties", { "spec": true }]
]
}
@danilosilvadev
danilosilvadev / callApplyBind.js
Last active Oct 15, 2017
JS Beyond is some snippets with core concepts of js that is important and is not basics.
View .babelrc
{
"presets": [
"react",
"es2015"
],
"plugins": [
"react-hot-loader/babel"
]
}