Skip to content

Instantly share code, notes, and snippets.

rafaelcaricio / Toothbrush_holder.stl
Last active September 4, 2023 15:04
Toothbrush Holder Model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// ==UserScript==
// @name Mastodon Bird UI
// @match*
// @grant GM_addStyle
// @grant GM_getResourceText
// @version 2
// @description A UserScript that applies the Mastodon Bird UI style to
// @resource layout-single-column
// @resource layout-multiple-columns
// @downloadURL
rafaelcaricio /
Created January 16, 2023 15:23 — forked from tjensen/
FFMPEG command for generating a "bars and tone" RTMP live stream
ffmpeg -re \
-f lavfi -i "smptebars=rate=30:size=640x360" \
-f lavfi -i "sine=frequency=1000" \
-vf drawtext="text='%{pts\:hms}':rate=30:x=(w-tw)/2:y=(h-lh)/2:fontsize=48:fontcolor=white:box=1:boxcolor=black" \
-f flv \
-vcodec libx264 -profile:v baseline -pix_fmt yuv420p -preset ultrafast -tune zerolatency -crf 28 \
-acodec aac \
rafaelcaricio /
Created July 8, 2021 09:00
Why not just use async Python for this API?
from fastapi import FastAPI
import requests
import httpx
import uuid
import logging
logging.basicConfig(format="%(asctime)s %(message)s")
log = logging.getLogger("myapp")
rafaelcaricio /
Last active May 19, 2019 17:22
Blog post example using Request ID in Async I/O Python app
import re
import asyncio
import logging
import logging.config
import uuid
from aiohttp import web
import aiotask_context as context
import logging
import signal
import sys
import time
import tracemalloc
logger = logging.getLogger(__name__)
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
apiVersion: v1
kind: ReplicationController
name: default-http-backend
replicas: 1
app: default-http-backend
rafaelcaricio /
Created June 18, 2017 10:49
Namehash Algorithm from EIP137 - Ethereum Name Service
import codecs
# pip install pysha3==1.0.2
from sha3 import keccak_256
def sha3(text):
return keccak_256(text).digest()
rafaelcaricio / gpg-agent.conf
Created May 10, 2016 12:30 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist