Skip to content

Instantly share code, notes, and snippets.

View dublado's full-sized avatar
📭
Send me a Telegram

Thiago Machado dublado

📭
Send me a Telegram
View GitHub Profile
@Niccolum
Niccolum / conftest.py
Created June 14, 2022 06:22
How to prepare conftest for testing fastapi with sqlmodel
import asyncio
import logging
import typing as t
from contextlib import contextmanager
import fastapi
import pytest
from httpx import AsyncClient
from mixer.backend.sqlalchemy import Mixer
from pytest_mock import MockerFixture
@dublado
dublado / django-settings-runserver.py
Created April 21, 2022 15:18
django runserver port and addr
from django.core.management.commands.runserver import Command as runserver
runserver.default_port = "8008"
runserver.default_addr = "0.0.0.0"
@marcusramberg
marcusramberg / cloudflare
Created October 5, 2014 23:18
Ansible cloudflare module
#!/usr/bin/env perl
# WANT_JSON
use strict;
#use warnings;
use Mojo::Cloudflare;
use Mojo::JSON;
use Mojo::Util qw/slurp/;