Skip to content

Instantly share code, notes, and snippets.

@aleixmorgadas
aleixmorgadas / 0_README.md
Last active April 7, 2025 12:36
Starting a FastAPI as a server mock

Using FastAPI as Server Mock

I wanted to start a real mock server with real instances that I could fine tune for my own needs.

I found a way to start the FastAPI to run the tests agains it, and then kill the uvicorn.

Here an example code 👍

image

@bomzheg
bomzheg / Desc.md
Created February 28, 2024 19:29
dishka tests

We have some app and dishka container

from fastapi import FasAPI

from dishka.integrations.fastapi import Depends, inject, setup_dishka

router = APIRouter()

@router.get("/")
@inject
@edpyt
edpyt / conftest.py
Last active January 25, 2025 15:10
SQLAlchemy, PyTest nested transaction mode
from typing import Generator
import pytest
from sqlalchemy import Engine, create_engine
from sqlalchemy.orm import Session, sessionmaker
from .models import Base
@pytest.fixture(name="engine", scope="session")
@EdenQwQ
EdenQwQ / animations.nix
Created January 6, 2025 11:42
My niri setup using nix
{
programs.niri.settings.animations = {
window-open = {
easing = {
curve = "ease-out-expo";
duration-ms = 800;
};
};
window-close = {
easing = {

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W
@Mnkai
Mnkai / PKGBUILD
Last active June 9, 2025 07:17
libfprint focaltech 2808:0752
# Adapted from original PKGBUILD by Harry Walker <[email protected]>
pkgname=libfprint-focaltech
pkgver=0.1
pkgrel=1
pkgdesc="Proprietary driver for the Focaltech fingerprint reader"
arch=('x86_64')
url="https://github.com/ftfpteams/focaltech-linux-fingerprint-driver"
depends=('glib2>=2.56' 'libgusb>=0.3.0' 'nss>=3.13.4' 'pixman>=0.30.0')
conflicts=('libfprint')
provides=('libfprint-2.so' 'libfprint')