Skip to content

Instantly share code, notes, and snippets.

View wvandeun's full-sized avatar
😎

Wim Van Deun wvandeun

😎
View GitHub Profile
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active July 10, 2024 12:43
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
@shadow-light
shadow-light / pipenvlink
Created September 14, 2018 03:04
A script to generate the equivalent of a symlink for python scripts that require a pipenv
#! /bin/bash
set -euo pipefail
# This script will remove automatic association for all networks not listed in the whitelist
# passed as the first argument. Passwords will NOT be removed from the Keychain.
#
# Alternatively, you can untick "Remember networks" in Network Preferences > Wi-Fi > Advanced,
# but then you won't be able to auto-join networks even temporarily, and you might already
# have a long list to go through.
#