Skip to content

Instantly share code, notes, and snippets.

View rg3915's full-sized avatar
Working from home

Regis Santos rg3915

Working from home
View GitHub Profile
rg3915 /
Created May 6, 2024 01:18
edit form with disabled field - disabled select form field
rg3915 /
Last active April 19, 2024 01:24
Guia básico de conceitos sobre Django - conceitos django - backend vs frontend


Login com CPF e senha


Falta login


rg3915 /
Created April 14, 2024 03:08
Digital Ocean Storage
rg3915 / index.html
Created April 6, 2024 19:16
Mask mascara VanillaMasker mask JS
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<link rel="shortcut icon" href="">
rg3915 /
Created March 28, 2024 18:50
git branch delete
rg3915 /
Created February 22, 2024 00:23
from datetime import timezone, timedelta
tz = timezone(timedelta(hours=-3))
rg3915 /
Created February 21, 2024 01:59
Cria e Edita PessoaFisica e PessoaJuridica com OneToOne com Cliente e usando o mesmo formulário
class ClienteCreateView(CreateView):
model = Cliente
template_name = 'clientes/cliente_form.html'
form_class = ClienteForm
success_url = reverse_lazy('listar_clientes')
def form_valid(self, form):
If the form is valid, save the associated model.
rg3915 /
Last active February 18, 2024 19:04
Create folders files with Python in command line

Create folders, subfolders and file in command line with Python and Shell Script.


sudo cp /usr/bin/
sudo cp /usr/bin/mkf
sudo chmod +x /usr/bin/mkf
rg3915 /
Last active May 9, 2024 13:20
Retorna Estado choices Django Ninja API
from ninja import Router, Schema
router = Router()
class EstadoChoices(models.TextChoices):
AC = 'AC', 'Acre'
AL = 'AL', 'Alagoas'
AP = 'AP', 'Amapá'
AM = 'AM', 'Amazonas'
rg3915 /
Created February 3, 2024 21:33
Create one folder and files inner this folder with Shell script. Create folder and files with Shell script.
: << 'COMMENT'
Create one folder and files inner this folder.
$ source "folder1/{file1.txt,file2.txt}" "folder2/{file3.txt,file4.txt}"