Skip to content

Instantly share code, notes, and snippets.

@diefans
diefans / .Xresources
Created October 14, 2024 13:44 — forked from Pitometsu/.Xresources
dotfiles
Xcursor.theme: ATER
! UI elements
Emacs.menuBar: 0
Emacs.toolBar: 0
Emacs.verticalScrollBars: off
! Font settings
Emacs.FontBackend: xft,x
Emacs.font: Inconsolata LGC-8.6
@diefans
diefans / threadpool_contextvars.py
Created June 26, 2025 08:33 — forked from nkhitrov/threadpool_contextvars.py
ThreadPoolExecutor with contextvars and asyncio
import contextvars
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
current_user = contextvars.ContextVar("ID of current user")
shared_user = contextvars.ContextVar("ID of shared user")
def say_hello():
time.sleep(1)
#! /usr/bin/env bash
##############################################################################################
# _ _ _ _ _ #
# (_) (_) | | | | | | #
# _ __ _ _ __ _ ___ ___ _ __ __ _ | |_ ___ | |__ _ __ __ _ __| | #
#| '_ \ | || '__|| | ______ / __| / __|| '__| / _` || __| / __|| '_ \ | '_ \ / _` | / _` | #
#| | | || || | | ||______|\__ \| (__ | | | (_| || |_ | (__ | | | || |_) || (_| || (_| | #
#|_| |_||_||_| |_| |___/ \___||_| \__,_| \__| \___||_| |_|| .__/ \__,_| \__,_| #
# | | #