Skip to content

Instantly share code, notes, and snippets.

View Leandroswq's full-sized avatar

Leandro de Souza Bonfim Leandroswq

View GitHub Profile
# Opens a PowerShell instance with elevation, finds the wsl ip without relying on hostname, since ArchWSL and others doesn't have it
# then iterate opening the selected ports
$principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$remoteport = wsl -- ip -o -4 -json addr list eth0 ` | ConvertFrom-Json ` | %{ $_.addr_info.local } ` | ?{ $_ }
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if($found) {
$remoteport = $matches[0];
} else{
@Leandroswq
Leandroswq / ambiente-dev-ubuntu.sh
Created January 30, 2023 12:06 — forked from luizomf/ambiente-dev-ubuntu.sh
Ambiente de desenvolvimento Python no Ubuntu - Com VS Code, Google Chrome, ZSH, Oh-my-zsh, zsh-syntax-highlighting, zsh-autosuggestions e spaceship prompt.
#!/bin/bash
# Executar comandos a seguir para atualizar os pacotes
sudo apt update -y
sudo apt upgrade -y
# Só o Python
sudo apt install python3.10-full python3.10-dev -y
# Instalar pacotes a seguir
@Leandroswq
Leandroswq / gist:0d05aa72085dc45396bf3ee228e61e09
Created July 26, 2022 15:57 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:

Como fazer o deploy no github pages usando o react

Passo 1: Adicionar as duas linhas abaixo no arquivo package.json dentro de scripts

"predeploy": "npm run build",
"deploy": "gh-pages -d build",

Exemplo

"scripts": {

Passo a passo React Redux

Instalação

  • npx create-react-app my-app-redux;
  • cd my-app-redux
  • npm install redux react-redux;
  • npm install react-router-dom@v5 (caso utilizar rotas)
  • npm install redux-thunk (caso utilizar operações assíncronas no redux)
  • npm install --save redux-devtools-extension (caso utilizar operações assíncronas no redux)

Checklist do react-redux

Antes de começar

  • pensar como será o formato do seu estado global
  • pensar quais actions serão necessárias na sua aplicação

Instalação

  • npm i redux react-redux;
  • npm i redux-devtools-extension;
@Leandroswq
Leandroswq / conventional_commits.md
Created February 8, 2022 23:53 — forked from ivanrosolen/conventional_commits.md
Guia para mensagens de commits

Guia para mensagens de commits

Formato da mensagem

Cada mensagem de commit consiste em um cabeçalho, um corpo e um rodapé.

Cabeçalho

Tem um formato pré-definido, que inclui um tipo e um título: