Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
probably coding

Gabriel Falcão gabrielfalcao

👨‍💻
probably coding
View GitHub Profile
View BLM.txt
Black Lives Matter!
Please check out ways you can help out the movement:
https://blacklivesmatters.carrd.co/
View README.md

Usage

go test ./...
@gabrielfalcao
gabrielfalcao / segfault.py
Created Dec 19, 2019 — forked from coolreader18/segfault.py
Make CPython segfault in 5 lines of code.
View segfault.py
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)
@gabrielfalcao
gabrielfalcao / rsa_encryption.py
Created Nov 30, 2019
Using python cryptography module to generate an RSA keypair, serialize, deserialize the keys and perform encryption and decryption
View rsa_encryption.py
import base64
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
def utf8(s: bytes):
return str(s, 'utf-8')
@gabrielfalcao
gabrielfalcao / cryptography_ecdsa.py
Created Nov 30, 2019
Ed25519 signing in python
View cryptography_ecdsa.py
from cryptography.hazmat.primitives.asymmetric.ed25519 import (
Ed25519PrivateKey,
Ed25519PublicKey,
)
from cryptography.hazmat.primitives import serialization
private_key = Ed25519PrivateKey.generate()
public_key = private_key.public_key()
@gabrielfalcao
gabrielfalcao / lettuce_wait.py
Created May 10, 2019
generic wait functions for browser testing with lettuce
View lettuce_wait.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import time
import threading
from functools import wraps
from lxml import html
from lxml.etree import XMLSyntaxError
from lettuce import world, before, after
@gabrielfalcao
gabrielfalcao / dojo-kata-ideas.md
Created Oct 5, 2018
Ideas for practical dojos
View dojo-kata-ideas.md

Kata Ideas for Coding Dojos

CaseParser

A library and/or command-line tool to detect case of a word and translates to any other case.

Must support case types:

  • camelCase
  • PascalCase
View github-repository-projects-and-cards.gql
{
repository(name: "berlin", owner: "gabrielfalcao") {
name
shortDescriptionHTML
description
owner {
id
login
avatarUrl
url
You can’t perform that action at this time.