Skip to content

Instantly share code, notes, and snippets.

View FFY00's full-sized avatar
🌈
struggling to live

Filipe Laíns 🇵🇸 FFY00

🌈
struggling to live
View GitHub Profile
@FFY00
FFY00 / symbols.md
Last active December 19, 2024 06:25
@FFY00
FFY00 / 0001-Bug-1935621-Fix-virtual-environment-sysconfig-path-c.patch
Created December 7, 2024 21:18
Fix Firefox's build-system with Python >=3.12.8, >=3.13.1, >=3.14.0a2
From 44479f1f9cb21c0eb517c0fd09e3fdc993b30d8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Filipe=20La=C3=ADns?= <[email protected]>
Date: Sat, 7 Dec 2024 21:03:31 +0000
Subject: [PATCH] Bug 1935621 - Fix virtual environment sysconfig path
calculation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Filipe Laíns <[email protected]>
$ tox -e py313
.pkg: _optional_hooks> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py313: install_package> python -m pip install --no-binary coverage --force-reinstall --no-deps /home/anubis/git/wrapt/.tox/.tmp/package/201/wrapt-1.16.0.tar.gz
py313: commands[0]> python -m coverage run --rcfile /home/anubis/git/wrapt/setup.cfg -m pytest -v /home/anubis/git/wrapt/tests
===========================================
@FFY00
FFY00 / MT-L-adapter.scad
Last active September 9, 2024 12:46
Mitutoyo MT-L Mounting Adapter
$fn = 100;
// For M3 inserts
insert_diameter = 4;
insert_height = 7;
insert_boder_spacing = 3;
lens_diameter = 35 + 0.1;
lens_height = 32 + 6;
distance_to_objective = 134 - lens_height;
# SPDX-License-Identifier: MIT
import faulthandler
import sys
import PySide6 # noqa: F401, E402
import pyqtgraph as pg
import pyqtgraph.parametertree
import numpy as np
import numpy.typing as npt
#!/bin/env python
import datetime
import locale
import os
import pathlib
import sys
import zoneinfo
import urllib.parse
@FFY00
FFY00 / build.sh
Last active August 1, 2024 10:45
Out-of-tree NGINX modules build and installation scripts
#!/bin/sh
NGINX_SRC=/usr/src/nginx-1.26.1-1.fc40
ln -sf $NGINX_SRC/auto
ln -sf $NGINX_SRC/src
$NGINX_SRC/configure \
--with-compat \
--add-dynamic-module=../nginx-module-FOO \
(00000000) 0: > 255 (11111111)
(00000001) 1: > 253 (11111101)
(00000010) 2: > 251 (11111011)
(00000011) 3: > 249 (11111001)
(00000100) 4: > 247 (11110111)
(00000101) 5: > 245 (11110101)
(00000110) 6: > 243 (11110011)
(00000111) 7: > 241 (11110001)
(00001000) 8: > 239 (11101111)
(00001001) 9: > 237 (11101101)
@FFY00
FFY00 / json-schema-to-rst.py
Created June 26, 2024 06:50
PEP 739 supporting files
import argparse
import contextlib
import io
import json
import os
import pathlib
import sys
import textwrap
from typing import Iterator, Literal, Required, TypedDict
@FFY00
FFY00 / update-project.py
Created May 22, 2024 22:44
Incomplete WIP
import dataclasses
import inspect
import json
import logging
import os
import pprint
import string
import subprocess
import textwrap
import types