Skip to content

Instantly share code, notes, and snippets.

View daviwesley's full-sized avatar
😃
let's code!

Davi Wesley daviwesley

😃
let's code!
  • Netherrealm
View GitHub Profile
@cvzi
cvzi / jwt_tools.py
Created March 15, 2019 13:09
Encode and decode JSON Web Token/JWT (with RS256) from private/public key files
"""
Encode and decode JSON Web Token/JWT (with RS256) from private/public key files
Requires https://cryptography.io:
pip install cryptography
"""
__author__ = 'cuzi'
__email__ = 'cuzi@openmail.cc'
__all__ = ['generate_jwt', 'validate_jwt']
#!/usr/bin/python3
"""
MD2 Message Digest Algorithm.
Implemented by Cameron Lonsdale to the spec of RFC 1319.
"""
import binascii
# Permutation of 0..255 constructed from the digits of pi.
@morenopc
morenopc / admin.py
Last active June 28, 2018 05:09
Funcionários models Sobrescrever formulário admin para adicionar dois objetos User e Funcionario
class FuncionarioForm(forms.ModelForm):
""" Sobrescreve formulário de funcionários """
class Meta:
model = Funcionario
exclude = ('usuario', )
def __init__(self, *args, **kwargs):
super(FuncionarioForm, self).__init__(*args, **kwargs)
# Editar funcionário: valores iniciais

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close