Skip to content

Instantly share code, notes, and snippets.

@ahal
ahal / try_usage_last_month.md
Last active November 26, 2020 20:49
How try selectors are used over various time intervals
Method Pushes Percent Users Push / User Hours / Push
total 4730 100.0 245 19.31 45.1
mach try fuzzy 1773 37.5 139 12.76 27.9
mach try again 865 18.3 62 13.95 48.3
mach try chooser 728 15.4 83 8.77 62.0
mach try auto 725 15.3 78 9.29 54.0
other 235 5.0 5 47.0 0.0
vanilla try syntax 129 2.7 11 11.73 0.0
mach try syntax 116 2.5 18 6.44 72.1
@ahal
ahal / last-month.md
Last active July 7, 2020 16:03
`mach try auto` decision task statuses
Status Count Percent
completed 566 89.8
failed 61 9.7
canceled 2 0.3
claim-expired 1 0.2
from typing import Callable, Type
def register() -> Callable:
def wrap(cls: Type) -> Type :
return cls
return wrap
@ahal
ahal / community-aws-worker-pools.md
Last active January 25, 2022 22:31
Firefox-CI Worker Pools on AWS
@ahal
ahal / fetch-content
Last active July 11, 2022 15:11
fetch-content
#!/usr/bin/python3 -u
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import argparse
import bz2
import concurrent.futures
import gzip
import hashlib
@ahal
ahal / switch-input
Created March 27, 2026 22:39
Switch LG 45GX950A input on Linux
#!/usr/bin/env python3
"""Switch LG 45GX950A input source via DDC alt mode.
System package dependencies:
ddcutil - detects the i2c bus (https://www.ddcutil.com)
i2c-tools - provides i2ctransfer for raw i2c writes
Run without root:
sudo groupadd i2c
sudo usermod -aG i2c $USER