Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@andrebrait
andrebrait / keychron_linux.md
Last active March 13, 2025 12:33
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@tiran
tiran / python-on-debian.md
Last active May 21, 2024 08:46
Negative Python user experience on Debian/Ubuntu

Negative Python user experience on Debian/Ubuntu

The user experience of Python on a minimal Debian or Ubuntu installation is bad. Core features like virtual environments, pip bootstrapping, and the ssl module are either missing or do not work like designed and documented. Some Python core developers including me are worried and consider Debian/Ubuntu's packaging harmful for Python's reputation and branding. Users don't get what they expect.

Reproducer

The problems can be easily reproduced with official Debian and Ubuntu containers in Docker or Podman. Debian Stable (Debian 10 Buster) comes with Python 3.7.3. Ubuntu Focal (20.04 LTS) has Python 3.8.5.

Run Debian container

@probonopd
probonopd / Wayland.md
Last active March 13, 2025 19:58
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

attrs 20.1.0 released!

I’m thrilled to finally present attrs 20.1.0 with the following changes:

  • bug fixes
  • performance improvements

JUST KIDDING!

This release is HUGE and I'm stoked we can finally get it to you! It’s the result of more than a year of development and not only does it come with many great features that users desired for a long time, it also lays the foundation for the future evolution of this package.

@abadger
abadger / pyre-example.py
Last active February 5, 2021 00:54
Some more thoughts on soluttions to problems with python's present type annotations
# I've been trying to reconcile Python's concept of variables as references to values instead of
# the values themselves with type annotations. I think I've hit upon some ideas. Unfortunately,
# they aren't all compatible with Python's current type annotation syntax.
#
# Background: References vs values
# ================================
#
# In C, you might write some code like this::
#
# #include<stdio.h>
@ssokolow
ssokolow / ocv.py
Created April 24, 2020 03:58
OpenCV's :ocv: Sphinx domain, patched up for Sphinx 2.3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ocv domain, a modified copy of sphinx.domains.cpp + shpinx.domains.python.
The original copyright is below
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The OpenCV C/C++/Python/Java/... language domain.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
@sefasenturk95
sefasenturk95 / delete_artifacts.py
Last active October 7, 2021 13:26
Delete artifacts automatically
import json
import urllib.request
import math
access_token = "rqtweyjhg"
org_name = "my-org"
keep_artifacts = 2
def get_all_artifacts(repo_name: str) -> []:
@smurfix
smurfix / result_taskgroup.py
Last active January 3, 2025 07:36
anyio ResultGatheringTaskgroup
import anyio
from contextlib import asynccontextmanager
class NotYet(RuntimeError):
pass
class ResultGatheringTaskgroup:
def __init__(self):
self.result = []