Skip to content

Instantly share code, notes, and snippets.

@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')

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
@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 = {
@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")
@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
@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

@gelldur
gelldur / Grafana Alert Template.md
Last active June 25, 2025 05:48 — forked from Himura2la/Grafana Alert Template.md
How to use Grafana Alerts with the Telegram
  • Template name: telegram.message
  • Content:
    {{- /* Telegram message to use: {{ template "telegram.message2" . }} */ -}}
    {{ define "__alerts_list" -}}
    {{ range . }}
    {{if ne (index .Labels "alertname") "" -}}
    {{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }}
        {{- if ne (index .Labels "severity") "" -}}
            <u><b>P{{ index .Labels "severity" }}</b></u> {{ end -}}
@fabian-thomas
fabian-thomas / orgzly-sync.sh
Last active May 15, 2025 06:15
Orgzly auto syncronisation for sync tools like syncthing. See orgzly/orgzly-android#8.
#!/data/data/com.termux/files/usr/bin/bash
# https://github.com/orgzly/orgzly-android/issues/8
orgzly_sync() {
# if you are using orgzly-revived use the following instead:
# am broadcast -n com.orgzlyrevived/com.orgzly.android.ActionReceiver -a com.orgzly.intent.action.SYNC_START
am broadcast -n com.orgzly/com.orgzly.android.ActionReceiver -a com.orgzly.intent.action.SYNC_START
}
@amantinband
amantinband / Aggregates.Bill.md
Last active January 2, 2025 19:24
Buber Dinner Domain Aggregates

Domain Aggregates

Bill

class Bill
{
    // TODO: Add methods
}
@Himura2la
Himura2la / Grafana Alert Template.md
Last active December 24, 2024 14:41
How to use Grafana Alerts with the Telegram
  • Template name: telegram.message
  • Content:
    {{ define "alert_list" }}{{ range . }}{{ .Labels.alertname }}
    {{ range .Annotations.SortedPairs }}<strong>{{ .Name }}</strong>: {{ .Value }}
    {{ end }}| {{ if gt (len .GeneratorURL) 0 }}<a href="{{ .GeneratorURL }}">source</a> | {{ end }}{{ if gt (len .SilenceURL) 0 }}<a href="{{ .SilenceURL }}">silence</a> | {{ end }}{{ if gt (len .DashboardURL) 0 }}<a href="{{ .DashboardURL }}">dashboard</a> | {{ end }}{{ if gt (len .PanelURL) 0 }}<a href="{{ .PanelURL }}">panel</a> |{{ end }}
    —
    {{ end }}{{ end }}
    {{ define "telegram.message" }}
    

{{ if gt (len .Alerts.Firing) 0 }}FIRING!!!