Skip to content

Instantly share code, notes, and snippets.

@lambdalisue
lambdalisue / windows.py
Created February 19, 2018 23:59
Ctrl+C hotfix patch of asyncio on Windows
import asyncio
import sys
# Ctrl-C (KeyboardInterrupt) does not work well on Windows
# This module solve that issue with wakeup coroutine.
# https://stackoverflow.com/questions/24774980/why-cant-i-catch-sigint-when-asyncio-event-loop-is-running/24775107#24775107
if sys.platform.startswith('win'):
def hotfix(loop: asyncio.AbstractEventLoop) -> asyncio.AbstractEventLoop:
loop.call_soon(_wakeup, loop, 1.0)
return loop
@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/