cmd+k z
-> zen modecmd+\
-> side-by-sidecmd+b
-> toggle sidebarcmd+shift+m
-> problems panelctrl+j
-> join line
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 twColors from 'tailwindcss/colors' | |
const colors = { | |
'brand-50': 'hsl(189 17% 92%)', | |
'brand-100': 'hsl(188 19% 84%)', | |
'brand-200': 'hsl(190 18% 68%)', | |
'brand-300': 'hsl(188 18% 52%)', | |
'brand-400': 'hsl(189 30% 37%)', | |
'brand-500': 'hsl(189 68% 21%)', | |
'brand-600': 'hsl(189 67% 17%)', |
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
https://checkout.belezanaweb.com.br | |
https://checkout.ckamura.com.br | |
https://checkout.studiow.com.br | |
https://checkout.inoar.com.br | |
https://checkout.oceane.com.br | |
https://checkout.smashboxatbeleza.com.br | |
https://checkout.phytoparis.com.br | |
https://checkout.allthingshair.com | |
https://checkout.makeupforever.com | |
https://checkout.nars.com.br |
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 url = 'https://res.cloudinary.com/beleza-na-web/image/upload/w_1500,f_auto,fl_progressive,q_auto:eco,w_1800,c_limit/e_trim/v1/imagens/5/good-girl-carolina-herrera-eau-de-parfum-perfume-feminino-80ml-38271-1371676352244596349.jpg' | |
const transformationRE = /(\/(upload|fetch)\/)(.+?)(\/v\d+)/g | |
const [,,, transformation] = transformationRE.exec(url) | |
console.log(transformation) |
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
//campo para validação da bandeira de cartão | |
function getCreditCardLabel(c){ | |
// SOMENTE NÚMEROS | |
let re = new RegExp("^\d+$"); | |
if (c.match(re) != null) | |
return false; |
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
let brands = {}; | |
brands["elo"] = { | |
regexpBin: /^401178|^401179|^431274|^438935|^451416|^457393|^457631|^457632|^504175|^627780|^636297|^636368|^(506699|5067[0-6]\d|50677[0-8])|^(50900\d|5090[1-9]\d|509[1-9]\d{2})|^65003[1-3]|^(65003[5-9]|65004\d|65005[0-1])|^(65040[5-9]|6504[1-3]\d)|^(65048[5-9]|65049\d|6505[0-2]\d|65053 [0-8])|^(65054[1-9]|6505[5-8]\d|65059[0-8])|^(65070\d|65071[0-8])|^65072[0-7]|^(65090[1-9]|65091\d|650920)|^(65165[2-9]|6516[6-7]\d)|^(65500\d|65501\d)|^(65502[1-9]|6550[3-4]\d|65505[0-8])/, | |
regexpFull: /^(401178|401179|431274|438935|451416|457393|457631|457632|504175|627780|636297|636368|(506699|5067[0-6]\d|50677[0-8])|(50900\d|5090[1-9]\d|509[1-9]\d{2})|65003[1-3]|(65003[5-9]|65004\d|65005[0-1])|(65040[5-9]|6504[1-3]\d)|(65048[5-9]|65049\d|6505[0-2]\d|65053[0-8])|(65054[1-9]| 6505[5-8]\d|65059[0-8])|(65070\d|65071[0-8])|65072[0-7]|(65090[1-9]|65091\d|650920)|(65165[2-9]|6516[6-7]\d)|(65500\d|65501\d)|(65502[1-9]|6550[3-4]\d|65505[0-8]))[0-9]{10,12}/, | |
regexpCvv: /^\d{3}$/, | |
}; |
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 default { | |
elo: ['401178', '401179', '431274', '438935', '451416', '457393', '457631', '457632', '498405', '498410', '498411', '498412', '498418', '498419', '498420', '498421', '498422', '498427', '498428', '498429', '498432', '498433', '498472', '498473', '498487', '498493', '498494', '498497', '498498', '504175', '506699', '506700', '506701', '506702', '506703', '506704', '506705', '506706', '506707', '506708', '506709', '506710', '506711', '506712', '506713', '506714', '506715', '506716', '506717', '506718', '506719', '506720', '506721', '506722', '506723', '506724', '506725', '506726', '506727', '506728', '506729', '506730', '506731', '506732', '506733', '506734', '506735', '506736', '506737', '506738', '506739', '506740', '506741', '506742', '506743', '506744', '506745', '506746', '506747', '506748', '506749', '506750', '506751', '506752', '506753', '506754', '506755', '506756', '506757', '506758', '506759', '506760', '506761', '506762', '506763', '506764', '506765', '506766', '506767', '506768', |
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 axios from 'axios' | |
import { shim } from 'promise.prototype.finally' | |
import locale from 'constants/locale' | |
import { is } from 'utils' | |
import { slugify } from 'utils/string' | |
import { translateNotification } from 'utils/response' | |
shim() | |
const axiosInstance = axios.create({ |
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
// Errado | |
// Não queria criar uma tag span desnecessariamente | |
<ProductName> | |
<a href={`${baseUrl}/${product.slugName}`} > | |
<strong dangerouslySetInnerHTML={{__html: product.brand.name}} />{' '} | |
<span dangerouslySetInnerHTML={{__html: product.name}} /> | |
</a> | |
</ProductName> | |
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
/* | |
* WARNING: Mutates the fetchContext argument (by default the window or global context). | |
* | |
* A crude way to intercept fetch responses, and dispatch actions as needed. Using this | |
* for more global app concerns, where I may want to dispatch actions depending on the response | |
* status or body. e.g. When seeing a 401, dispatch a logout action. | |
* | |
* In most cases, I'd recommend using a middlware as shown in redux's real-world example. | |
* (https://github.com/reactjs/redux/blob/master/examples/real-world/middleware/api.js) | |
* |
NewerOlder