Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Rafael Carício rafaelcaricio

🏠
Working from home
Block or report user

Report or block rafaelcaricio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rafaelcaricio
rafaelcaricio / example_app.py
Last active May 19, 2019
Blog post example using Request ID in Async I/O Python app
View example_app.py
import re
import asyncio
import logging
import logging.config
import uuid
from aiohttp import web
import aiotask_context as context
View profiling_memory.py
import logging
import signal
import sys
import time
import tracemalloc
logger = logging.getLogger(__name__)
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
View ingress-docker-registry.yaml
# https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/examples/default-backend.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: default-http-backend
spec:
replicas: 1
selector:
app: default-http-backend
template:
@rafaelcaricio
rafaelcaricio / namehash.py
Created Jun 18, 2017
Namehash Algorithm from EIP137 - Ethereum Name Service
View namehash.py
import codecs
# pip install pysha3==1.0.2
from sha3 import keccak_256
def sha3(text):
return keccak_256(text).digest()
@rafaelcaricio
rafaelcaricio / gpg-agent.conf
Created May 10, 2016 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
View gpg-agent.conf
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
@rafaelcaricio
rafaelcaricio / api.py
Created Apr 25, 2016
Custom type format - Connexion
View api.py
import logging
import re
from connexion import App
from jsonschema import draft4_format_checker
MONEY_RE = re.compile('^\$\s*\d+(\.\d\d)?')
logging.basicConfig(level=logging.DEBUG)
View myfirst_clojure_program.clj
(defn fizzbuzz [max_value]
(fizzbuzz_acc max_value 1))
(defn fizzbuzz_acc [max_value acc]
(if (<= acc max_value)
(do (if (is_fizzbuzz acc)
(println "fizzbuzz")
(if (is_fizz acc)
(println "fizz")
(if (is_buzz acc)
View gist:45bea001a1d93754b415
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.1
Comment: https://keybase.io/crypto
wcFMA/L5rq4WVDHqAQ/7B1q6ynmpFPIpca/CiWQqtwbfQwht8TwkyUPYtdq1r6XZ
12dBkcaDW0TmBCPeJcDeiyLra+bdYR613VrnqKkR0QtU/7TTkqntq6lXMOuBILzY
cdAMU1Q4mFOsCCs/J9ivDV/QWUcYrCXSRTE3HQw20n66uSFFBzzXAh4gmu73gFb/
psjSqyzyKjEzfcu1AByue4bQmi5j2mlApCcQ5OZ73ddoUF66d2EcMjFwLt/9yEiA
HSMaOwsxf8ezuvj0vNrrHCp5yZ//Oi6AYdbjCBzvbhQg76O0ZKvgPn9gm2+x0xfP
P/1/HruYZ/crje9STkial+8PTnskOv5IxHLGIuSRcHiMAEohcoIxtifaLTTXQIhB
View gist:0733517d3bc44892325b
### Keybase proof
I hereby claim:
* I am rafaelcaricio on github.
* I am rafaelcaricio (https://keybase.io/rafaelcaricio) on keybase.
* I have a public key whose fingerprint is 08D9 4BF8 357C 744E 8964 FBB0 75AE 057C EE9E DF0C
To claim this, I am signing this object:
@rafaelcaricio
rafaelcaricio / all_emails.txt
Created Jan 7, 2015
Readable version of emails communication with Alchemia staff
View all_emails.txt
Dear Alchemia staff,
It's with profound disappointment I am writing you this e-mail to describe a racist situation towards my friends and I coming from your security guards on the night of Saturday 04/01/2015 to Sunday 05/01/2015.
I am a foreigner which regularly visits Krakow as I am always in love with this city and its people. Having coming here for so many years, I ended up making many local friends and one of our favourite spots is Alchemia in Plac Nowy.
Unfortunately yesterday an event left me shocked and very sad. Whilst having a good time with my friends, having a chat and laughs, two of your hired security staff, sitting on a table in the corner, began to shout racist comments and gestures against our table. It was not a joke - the prejudice was towards us, a group of foreigners and locals, and it was deliberate. We could hear sounds and gestures that imitated a monkey as well as sayings like "kurwa malpa", which according to our local friends, meant "fucking monkeys".
As an esteemed customer
You can’t perform that action at this time.