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
rg3915 / index.html
Last active April 21, 2024 03:47
EasyTimer.js and countdown with Vanilla Javascript
<!-- index.html -->
<!-- with EasyTimer.js and Vanilla Javascript -->
<!-- https://albert-gonzalez.github.io/easytimer.js/#countdownTimerExample -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>EasyTimer</title>
@rg3915
rg3915 / README.md
Last active April 19, 2024 01:24
Guia básico de conceitos sobre Django - conceitos django - backend vs frontend

Objetivo

Login com CPF e senha

authenticate

Falta login

django-cpf-cnpj

@rg3915
rg3915 / README.md
Created April 14, 2024 03:08
Digital Ocean Storage
@rg3915
rg3915 / index.html
Created April 6, 2024 19:16
Mask mascara VanillaMasker mask JS
<!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, shrink-to-fit=no">
<link rel="shortcut icon" href="http://html5-training-in-hyderabad.blogspot.com.br/favicon.ico">
<title>Mask</title>
@rg3915
rg3915 / menu-django-sige.png
Last active April 1, 2024 14:26
sugestão menu Django SIGE
menu-django-sige.png
@rg3915
rg3915 / helpers.py
Created February 11, 2022 05:14
name_group, has_group, has_groups, group_required, PermissionDenied
# https://www.bedjango.com/blog/top-6-django-decorators/
from functools import wraps
from django.core.exceptions import PermissionDenied
def name_group(user):
'''
Retorna o nome do grupo do usuário.
'''
@rg3915
rg3915 / README.md
Created March 28, 2024 18:50
git branch delete
@rg3915
rg3915 / nome_cap.md
Last active March 28, 2024 11:52
Colocar a primeira letra de cada palavra em maiúsculo, exceto em preposições 'da', 'de', 'di', 'do', 'du', 'para' ... - nome - pyladies - python

Tratar nomes com preposições

PyLadiesSP

Objetivo: colocar a primeira letra de cada palavra em maiúsculo, exceto em preposições 'da', 'de', 'di', 'do', 'du', 'para' ...

Texto: minicurso de python para mulheres

Resultado esperado: Minicurso de Python para Mulheres

@rg3915
rg3915 / remove-chrome-remote-desktop.sh
Created August 30, 2019 05:17
uninstall chrome remote desktop
sudo apt remove -y chrome-remote-desktop && sudo apt purge -y chrome-remote-desktop
@rg3915
rg3915 / admin.py
Created August 30, 2019 16:41
Custom CSS and JS on Django Admin
# https://riptutorial.com/django/example/5359/additional-css-styles-and-js-scripts-for-admin-page
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
list_display = ('__str__',)
date_hierarchy = 'created'
search_fields = ('first_name', 'last_name', 'email')
list_filter = (
# 'uf',
('created', DateRangeFilter),
)