Skip to content

Instantly share code, notes, and snippets.

View miguelitodev's full-sized avatar
🧭
Restarting

Miguel Riquelme miguelitodev

🧭
Restarting
View GitHub Profile

Prop target from tag

[_self] Open on own page

  <a href="https://youtube.com" target="_self">_self</a>
@miguelitodev
miguelitodev / hyper.js
Created May 27, 2021 16:39
Minhas configurações do terminal Hyper
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@miguelitodev
miguelitodev / .zshrc
Created May 27, 2021 16:37
Minhas configurações do arquivo .zshrc do Oh My Ozh
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@miguelitodev
miguelitodev / Pagination.js
Created April 25, 2021 11:03
Script de paginação em React JS
import React from "react";
// Máximo de botões que vai ser mostrado na page
const MAX_ITEMS = 9;
// Quantos botões que você quer a direita e esquerda
const MAX_LEFT = (MAX_ITEMS - 1) / 2;
/**
* limit: quantos itens por page
@miguelitodev
miguelitodev / index.html
Last active February 20, 2021 20:42
Input com mensagem personalizada de erro
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Teste</title>
<style>
body {
justify-content: center;

First git push in a new remote repository

  • git init
  • git add .
  • git commit -m "first commit"
  • git branch -M main
  • git remote add origin https://{website-of-repository}/{username}/{name-repository}.git
  • git push -u origin main

Committing after the first commit

import { createGlobalStyle } from 'styled-components';
export default createGlobalStyle`
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body, #root {
height: 100%;
@miguelitodev
miguelitodev / README.md
Last active August 20, 2020 16:31
Como gerar o .abb ou .apk da sua aplicação React Native

Como gerar o .abb ou .apk da sua aplicação React Native


  • Antes de tudo dê npm i dentro da pasta do projeto para ter certeza que todas as libs estão instaladas e atualizadas.
  • Pelo console, vá até o diretório ./android/app/ e dê o seguinte comando: keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 219000, esse comando vai te fazer algumas perguntas e gerar uma keystore dentro do seu projeto onde ela vai ter 25 anos de duração, é muito importante que caso você esteja fazendo um update essa chave não seja criada, e sim que já exista uma e você use a mesma, caso contrário o Google não permitirá nenhum update na aplicação, e caso seja a primeira vez criando, guade bem essa chave, pois ela mesmo subindo para o repositório ela não será upada pois está sendo ignorada dentro do arquivo .gitignore, por questões de segurança.
  • Edite o arquivo ~/.gradle/gradle.properties ou android/gradle.properties e inclua o seguinte (sub
@miguelitodev
miguelitodev / script.js
Created August 19, 2020 20:37
Adicionar um valor a um href vazio para que o link não recarregue a tela, JQuery & JavaScript
const tagA = document.querySelectorAll("a");
$(window).on("load", function () {
for (i = 0; i <= tagA.length; i++) {
if (tagA[i].href === document.URL) {
tagA[i].href = "javascript:void(0)";
} else {
return;
}
}
});
@miguelitodev
miguelitodev / README.md
Last active October 18, 2021 17:54
Como criar um pacote react-native, README do vídeo do canal

Como criar um pacote react-native

Antes de tudo crie sua conta no site do npm

Link: site do npm

É bom que o nome da pasta comece com react-native

  • criar uma pasta, de preferência com o nome que você quer para o pacote, e entre nela
  • dar npm init e configurar, dentro da pasta
  • npm set init.author.email “seu email aqui”, no terminal