javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
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 _compareDates = (date1, date2) => { | |
date2.setHours(date1.getHours()); | |
date2.setMinutes(date1.getMinutes()); | |
date2.setSeconds(date1.getSeconds()); | |
date2.setMilliseconds(date1.getMilliseconds()); | |
return date2 - date1; | |
}; | |
const isDatePast = (now, date) => _compareDates(now, date) < 0; |
cd "C:\Program Files\Java\jdk1.8.0_211\bin"
keytool -genkeypair -v -keystore [MYKEYSTORE].keystore -alias [MY-ALIAS] -keyalg RSA -keysize 2048 -validity 10000
keytool -list -v -keystore [PATH_TO_YOUR_KEYSTORE].keystore -alias [YOUR_ALIAS_NAME] -storepass YOUR_STORE_PASSWORD -keypass YOUR_KEY_PASSWORD
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
1. Abra o menu de desenvolvimento do app (CTRL + M no emulador) | |
2. vá para as opções de desenvolvedor (Dev Settings) | |
3. Selecione "Debug server host & port for device" | |
4. digite 127.0.0.1:8081 (ou a porta customizada do seu APP) | |
5. abra um terminal na pasta do projeto da API e digite o comando: adb reverse tcp:8000 tcp:8000 (ou a porta da sua API) |
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
1. Baixar o geny versão free (personal) sem VirtualBox caso já tenha instalado | |
2. Instalar tudo no padrão | |
3. Baixar uma VM por dentro do GM (eu usei um Nexus 5x com API level 23 Android 6) | |
4. Rodar a VM pra ver se está tudo OK | |
5. Abrir as configurações do Genymotion e ir na aba ADB | |
6. Selecionar um SDK customizado e apontar para a pasta do SDK usado pelo React Native (Android Studio padrão) | |
7. reiniciar a VM | |
8. Abrir o genymotion shell e rodar "devices list" | |
9. Copiar o IP do device e abrir um cmd | |
10. Rodar o comando: adb connect IP_DO_DEVICE:5555 |
- Instale as seguintes dependencias em seu projeto React:
yarn add -D babel-eslint prettier eslint-config-prettier eslint-plugin-prettier eslint eslint-plugin-react eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-import eslint-import-resolver-webpack
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
Quando o erro "Cannot change column 'id': used in a foreign key constraint '" | |
acontecer ao tentar atualizar um id que é referenciado por uma FK é possível desativar | |
a verificação das FKs com a flag abaixo | |
SET FOREIGN_KEY_CHECKS = 0; | |
/* Faça o que quiser aqui */ | |
SET FOREIGN_KEY_CHECKS = 1; |
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 express = require('express'); | |
const fetch = require('node-fetch'); | |
const redis = require('redis'); | |
const PORT = process.env.PORT || 5000; | |
const REDIS_PORT = process.env.PORT || 6379; | |
const client = redis.createClient(REDIS_PORT); | |
const app = express(); |
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
``` javascript | |
/* | |
Essas informações foram retiradas do site oficial do portal do empreendedor: | |
http://www.portaldoempreendedor.gov.br/temas/quero-ser/formalize-se/atividades-permitidas. | |
Atualizado em: 19/08/2020 | |
*/ | |
const mei = [ | |
'ABATEDOR(A) DE AVES COM COMERCIALIZAÇÃO DO PRODUTO INDEPENDENTE', |
OlderNewer