Skip to content

Instantly share code, notes, and snippets.

View jkulhanek's full-sized avatar

Jonáš Kulhánek jkulhanek

View GitHub Profile
@akruis
akruis / pickled_task_poc.py
Created February 10, 2021 16:29
A prove of concept for pickling / unpickling an asyncio.Task object
'''
A prove of concept for pickling / unpickling an asyncio.Task object
Limitations of this demo code:
- Requires Stackless Python 3.7, because this Python implementation can pickle coroutine objects.
- Uses the pure python task implementation asyncio.tasks._PyTask
Copyright (C) 2021 Anselm Kruis
@fnky
fnky / ANSI.md
Last active May 17, 2025 18:18
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@kriswebdev
kriswebdev / forcevpn.sh
Last active January 2, 2025 16:34
forcevpn: Force VPN for specific apps, in a better way than killswitch [Linux / OpenVPN]
#!/bin/bash
# === INFO ===
# ForceVPN
# Description: Force VPN tunnel for specific applications.
# If the VPN is down => blackhole the app network traffic.
# Better than a killswitch. IPv4.
VERSION="2.3.0"
# Author: KrisWebDev
# Requirements: Linux with kernel > 2.6.4 (released in 2008).
@glen-cheney
glen-cheney / encoding-video.md
Last active November 24, 2024 10:09
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus