Skip to content

Instantly share code, notes, and snippets.

View draincoder's full-sized avatar
😴

treaditup draincoder

😴
View GitHub Profile
@SamWarden
SamWarden / async_db_fixtures.py
Last active July 15, 2025 07:59
This is an example of fixtures for tests that depend on a Postgres database
import uuid
from collections.abc import AsyncGenerator, Generator
from typing import cast
import alembic.command
import pytest
from alembic.config import Config as AlembicConfig
from sqlalchemy import URL, Connection, text
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, async_sessionmaker, create_async_engine
from testcontainers.postgres import PostgresContainer
@maratori
maratori / .golangci.yml
Last active July 17, 2025 07:18
Golden config for golangci-lint
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021-2025 Marat Reymers
## Golden config for golangci-lint v2.2.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt it to suit your needs.
# If this config helps you, please consider keeping a link to this file (see the next comment).