Skip to content

Instantly share code, notes, and snippets.

View TPS's full-sized avatar
🤓
https://www.rakuten.com/r/TPSAMU?eeid=6991100

TPS

🤓
https://www.rakuten.com/r/TPSAMU?eeid=6991100
View GitHub Profile
@expiringplatform
expiringplatform / signal android v7.2.1 reproducible build error
Created April 1, 2024 13:43
signal android v7.2.1 reproducible build error
~/playground/Signal-Android$ docker run --rm -v $(pwd):/project -w /project signal-android ./gradlew clean assemblePlayProdRelease
Downloading https://services.gradle.org/distributions/gradle-8.0.2-all.zip
...............10%................20%................30%................40%................50%................60%................70%................80%................90%................100%
Welcome to Gradle 8.0.2!
Here are the highlights of this release:
- Improvements to the Kotlin DSL
- Fine-grained parallelism from the first build with configuration cache
- Configurable Gradle user home cache cleanup
@thesamesam
thesamesam / xz-backdoor.md
Last active May 24, 2024 04:20
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Minimal script to check whether a JPEG-XL file contains JPEG
# lossless reconstruction data, in a more robust way than
# grepping the output of jxlinfo.
#
# This parses the ISO BMFF structure directly, so has no dependencies.
#
# Usage:
@obfusk
obfusk / leaving-fdroid.md
Last active January 1, 2024 09:24
Leaving F-Droid

Edit: originally posted here on 2023-11-17.

Edit 2: "blocking protecting marginalised community members from abuse" refers to the events during the incident (which was never made public, which unfortunately leaves me unable to provide more detail) that prompted the creation of the Community Council to begin with.

Edit 3: please note that this statement was originally addressed to the F-Droid team, not a general audience.

Leaving F-Droid

With a heavy heart, I have no choice but to leave @fdroid, effective immediately.

@jborean93
jborean93 / New-S4UAccessToken.ps1
Last active February 8, 2024 05:50
Generates a Win32 Access Token using S4U (no password required)
# Copyright: (c) 2023, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
#Requires -Module Ctypes
Function New-S4UAccessToken {
<#
.SYNOPSIS
Generates an S4U access token.
@Winterhuman
Winterhuman / Results.txt
Last active September 26, 2023 04:22
Strange OxiPNG-PNGQuant results
# Explanation
PNGQuant: `pngquant --quality 100-100 --speed 1 --strip`
OxiPNG: `oxipng --opt max --strip all --alpha`
OxiPNG-ZF: `oxipng --opt max --strip all --alpha --zopfli`
Oxi-Quant: "PNGQuant" > "OxiPNG" (non-ZF)
@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active May 3, 2024 20:14
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
# Test Command 8.0.0 PATCH
1 zlib, o6 oxipng -o 6 -i 0 --out 01_oxi_normal.png t.png 48290731 45277379
2 same, interlaced oxipng -o 6 -i 1 --out 02_oxi_normal_interlaced.png t.png 50144548 50144548
3 max zlib oxipng --zc 12 -o max -i 0 -a --out 03_zc12_b.png t.png 48290731 45277379
4 Zopfli oxipng -Z -o 6 -i 0 --out 03_oxi_normal_ZOPFLI.png t.png 47883283 47883283

Comparison of output file size for example images processed with oxipng. Comparing libdeflater 0.11.0 and 0.13.0

@ziemek99
ziemek99 / enable-jxl-edge-91.md
Last active March 5, 2023 04:43
How to permanently enable JPEG XL in Microsoft Edge 91-109

⚠️ Instructions below only apply to outdated Microsoft Edge versions. Since JPEG XL support has been removed from the latest versions of Edge (110+), this guide is irrelevant on the latest systems. Windows 7 and 8(.1) are limited to Edge 109, so the guide can still be used there.

ℹ️ Users are advised to move to Thorium, an enhanced fork of Chromium that supports JPEG XL out of the box by default.


How to permanently enable JPEG XL in Microsoft Edge 91-109

import statistics
def has_converged(xs):
return all(x == xs[0] for x in xs)
def f(xs):
return [
statistics.mean(xs),