Skip to content

Instantly share code, notes, and snippets.

View luizomf's full-sized avatar
🙃
Segue programando =)

Luiz Otávio luizomf

🙃
Segue programando =)
View GitHub Profile
@luizomf
luizomf / vite-vitest-react.md
Last active June 21, 2023 21:59
Vitest and JavaScript for React

Creating a boilerplate for React 18 in ViteJS

Editorconfig

If your are using editorconfig, this is my config:

# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
@luizomf
luizomf / login.js
Created March 31, 2022 12:26
Exemplo de uso da API criada com Django Rest Framework com JavaScript.
(async function() {
console.clear();
const headers = {
'Content-Type': 'application/json',
};
const body = JSON.stringify({
"username": "joanadarc",
"password": "Abc@12345678"
});
const config = {
@luizomf
luizomf / gist:4a56cbb6d55a1710517992776166dac2
Created January 18, 2022 12:37
Links: Deploy, Hospedagem e domínio e opções inclusivas para todos
Título
Deploy, Hospedagem e domínio e opções inclusivas para todos
Domínio e hospedagem: guia para leigos
https://www.otaviomiranda.com.br/2018/dominio-e-hospedagem-guia-para-leigos/
Heroku
https://www.heroku.com/
VirtualBox Tutorial
@luizomf
luizomf / exemplo.py
Created November 12, 2021 12:16
Exemplo de comunicação entre janelas com PyQT5.
try:
import sys
sys.path.insert(0, '/opt/homebrew/opt/pyqt5/lib/python3.9/site-packages')
except:
...
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import (QApplication, QGridLayout, QMainWindow,
@luizomf
luizomf / settings.json
Created November 4, 2021 23:58
Configuração do VS Code para Python e Django.
{
"window.zoomLevel": 0,
"python.languageServer": "Pylance", // ms-python.vscode-pylance
"python.testing.unittestEnabled": false, // ms-python.python
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [], // -x to bail
"python.linting.flake8Enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.pylintArgs": [
"--load-plugins=pylint_django",
@luizomf
luizomf / ambiente-dev-ubuntu.sh
Last active May 2, 2024 12:13
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
@luizomf
luizomf / links.md
Created November 4, 2021 19:59
Links para download - Aula ambiente no Windows 11
@luizomf
luizomf / mac-monterey.md
Created November 3, 2021 12:33
Comandos para aula de criação de ambiente Python no Mac OS Monterey
@luizomf
luizomf / selenium.py
Created October 26, 2021 16:05
Código selenium para curso de Python.
from pathlib import Path
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from time import sleep
# Caminho para a raiz do projeto
ROOT_FOLDER = Path(__file__).parent.parent.parent
# Caminho para a pasta onde o chromedriver está
@luizomf
luizomf / README.md
Last active May 16, 2024 16:04
Useful Linux/Unix commands.

Se você usa MacOS

O macOs roda sobre Darwin OS (kernel XNU), que é um sistema UNIX-like. Então, todos os comandos abaixo também funcionam normalmente no MacOS. Recomendo utilizar o gerenciador de pacotes homebrew caso necessário instalar algo. Se quiser o mesmo terminal que eu (ZSH com Oh My ZSH), utilize este vídeo para configurar https://youtu.be/bs1-Wxb_KIc

Se você usa Windows

No Windows é possível utilizar o wsl2 e instalar uma versão do linux para acompanhar. Eu fiz alguns vídeos para você usar o Linux no Windows.