Skip to content

Instantly share code, notes, and snippets.

View daringer's full-sized avatar

Markus Meissner daringer

View GitHub Profile
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active April 21, 2024 17:32
Python asyncio event loop in a separate thread
"""
This gist shows how to run asyncio loop in a separate thread.
It could be useful if you want to mix sync and async code together.
Python 3.7+
"""
import asyncio
from datetime import datetime
from threading import Thread
from typing import Tuple, List, Iterable
@daringer
daringer / ssh_aliases.sh
Created June 7, 2014 04:17
generate a bash alias for each (exact) host line from .ssh/config
#!/bin/bash
##
## create an alias for each unambigous host entry in ${HOME}/.ssh/config
##
## instead of using "ssh myhostname" you can simply use "myhostname" to
## establish a ssh-connection to the host!
##
## You most likely have to change CACHE_FN to point somewhere,
## where you want to store the cache
@daringer
daringer / Makefile
Last active August 29, 2015 14:01 — forked from felipec/asus_fan.c
OLD/DEPRECATED/OBSOLETE/DONOTUSE: ASUS Fan control linux kernel module - NOW HERE: https://github.com/daringer/asus-fan
obj-m := asus_fan.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
install:
# just copy the .ko file anywhere below:
# /lib/modules/$(uname -r)/