Skip to content

Instantly share code, notes, and snippets.

View godrix's full-sized avatar
💻
trying to take over the world

Godri.dev godrix

💻
trying to take over the world
View GitHub Profile
function isExponentPushToken(str) {
const regex = /^ExponentPushToken\[[A-Za-z0-9_-]{22}\]$/;
return regex.test(str);
}
This file has been truncated, but you can view the full file.
[
{
"id": "1",
"mac": "000000",
"vendor": "Officially Xerox"
},
{
"id": "2",
"mac": "000001",
"vendor": "SuperLAN-2U"
@godrix
godrix / DEB.js
Created August 16, 2022 16:51
Disposable Email Blacklist
const email = ['0-mail.com', '0815.ru', '0815.ru0clickemail.com', '0clickemail.com', '0wnd.net', '0wnd.org', '10minutemail.com', '10minutemail.de', '123-m.com', '126.com', '12minutemail.com', '139.com', '163.com', '1ce.us', '1chuan.com', '1pad.de', '1zhuan.com', '20minutemail.com', '21cn.com', '24hourmail.com', '2prong.com', '30minutemail.com', '33mail.com', '3d-painting.com', '4warding.com', '4warding.net', '4warding.org', '60minutemail.com', '675hosting.com', '675hosting.net', '675hosting.org', '6ip.us', '6paq.com', '6url.com', '75hosting.com', '75hosting.net', '75hosting.org', '7days-printing.com', '7tags.com', '99experts.com', '9ox.net', 'a-bc.net', 'afrobacon.com', 'ag.us.to', 'agedmail.com', 'ajaxapp.net', 'akapost.com', 'ama-trade.de', 'ama-trans.de', 'amilegit.com', 'amiri.net', 'amiriindustries.com', 'ano-mail.net', 'anonbox.net', 'anonymail.dk', 'anonymbox.com', 'anonymousmail.org', 'anonymousspeech.com', 'antichef.com', 'antichef.net', 'antireg.com', 'antispam.de', 'armyspy.com', 'azmeil.tk', 'baxo
<meta httpEquiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta name="MobileOptimized" content="320" />
<meta name="HandheldFriendly" content="True" />
<meta name="theme-color" content="#121214" />
<meta name="msapplication-TileColor" content="#121214" />
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="google" content="notranslate" />
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
@godrix
godrix / React.snippets
Last active April 5, 2021 14:13
Snippets for React, React native and styled-components
{
"useStateHook": {
"prefix": "uState",
"body": [
"const [${1:state}, set${2:State}] = useState(${3});"
],
"description": "Create useState"
},
"useEffectHook": {
"prefix": "uEffect",
#!/usr/bin/env node
console.log('yay gist')
set number " Numera as linhas
set linebreak " Quebra a linha sem quebrar a palavra
set nobackup " Não salva arquivos de backup~
set wildmode=longest,list " Completa o comando com TAB igual o bash
set ignorecase " Ignora o case sensitive nas buscas
set smartcase " Se tiver alguma letra maiúscula, ativa o case sensitive
set gdefault " Sempre substitui todas as palavras, não só a primeira
set smartindent " Auto-indenta
set expandtab " Identa com espaços
set tabstop=2 " Quantidade de espaços por indentação
@godrix
godrix / commit_message.md
Last active May 27, 2021 16:55
Padrão e boas praticas para mensagens de commit

Styleguide para mensagens de commit

  • Escreva na forma imperativa. ("Adicionado feature X" ou "Corrigido bug Y")
  • Separar o assunto do corpo de texto com uma linha
  • Capitalizar a linha de assunto
  • Não termine a linha de assunto com ponto final
  • Primeira linha deve ter no maximo 72 caracteres
  • Considere usar um emoji no inicio da mensagem de commit
  • Envolver o path da alteração no commit tambem é uma boa ideia
  • Use o corpo para explicar o commit
@godrix
godrix / laction.sql
Last active September 25, 2019 14:03
Método Haversine
SELECT *, (6371 *
acos(
cos(radians({{GEO.LAT}})) *
cos(radians(lat)) *
cos(radians({{GEO.LONG}}) - radians(lng)) +
sin(radians({{GEO.LAT}})) *
sin(radians(lat))
)) AS distance
FROM tabela LOCATION distance <= {{RANGE.KM}}
window.onload = function() {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
console.log('Dispositivo Movel');
}
}