Skip to content

Instantly share code, notes, and snippets.

View gabrielfalcao's full-sized avatar
👨‍💻
probably writing tests

Gabriel Falcão gabrielfalcao

👨‍💻
probably writing tests
View GitHub Profile
@gabrielfalcao
gabrielfalcao / rsa_encryption.py
Created November 30, 2019 00:39
Using python cryptography module to generate an RSA keypair, serialize, deserialize the keys and perform encryption and decryption
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 November 30, 2019 00:38
Ed25519 signing in python
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 10:42
generic wait functions for browser testing with lettuce
#!/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 October 5, 2018 20:50
Ideas for practical dojos

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
{
repository(name: "berlin", owner: "gabrielfalcao") {
name
shortDescriptionHTML
description
owner {
id
login
avatarUrl
url
[5:08pm] Luis_Byclosure: I'm having problems applying the "5 Why" rule, to the feature
                         "login" (imagine an application like youtube)
[5:08pm] Luis_Byclosure: how do you explain the business value of the feature "login"?
[5:09pm] Luis_Byclosure: In order to be recognized among other people, I want to login
                         in the application (?)
[5:09pm] Luis_Byclosure: why do I want to be recognized among other people?
[5:11pm] aslakhellesoy:  Why do people have to log in?
[5:12pm] Luis_Byclosure: I dunno... why?
[5:12pm] aslakhellesoy:  I'm asking you
@gabrielfalcao
gabrielfalcao / stylish.css
Created June 21, 2018 15:25 — forked from amitmerchant1990/stylish.css
Revert back to good old GitHub Homepage
/**
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the CSS mentioned below.
3. Specify the "URLs on the domain" to be `github.com`.
4. Add a title and save.
*/
.dashboard-sidebar {
float: right;
padding-right: 10px;

Sphinx themes

Built-in themes

Basic

  • basic
  • default
  • epub
@gabrielfalcao
gabrielfalcao / vpn.md
Created February 14, 2018 10:17 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?

@gabrielfalcao
gabrielfalcao / vpn.md
Created February 14, 2018 10:17 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?