Skip to content

Instantly share code, notes, and snippets.

View acarl005's full-sized avatar
🤯
in awe

Andy acarl005

🤯
in awe
View GitHub Profile
@AnIrishDuck
AnIrishDuck / flock_mgr.py
Created August 29, 2012 18:59
Python flock context manager.
import fcntl
from contextlib import contextmanager
@contextmanager
def flocked(fd):
""" Locks FD before entering the context, always releasing the lock. """
try:
fcntl.flock(fd, fcntl.LOCK_EX)
yield
finally:
@judaew
judaew / keychron_k2.adoc
Last active July 15, 2024 16:15
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device