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
@pmarreck
pmarreck / jpegxl.bash
Created March 3, 2025 18:09
jpegxl: a bash function to make conversions to/from jpegxl easier!
#!/usr/bin/env bash
### jpegxl: a bash function to make conversions to/from jpegxl easier!
# Silence function - runs a command silently but preserves exit code
silence() {
"$@" >/dev/null 2>&1
return $?
}
@jzallas
jzallas / check_update.sh
Last active April 16, 2025 18:17
Samsung check updates
#!/bin/bash
# Retrieve the list of packages
packages=$(adb shell pm list packages | sed 's/package://')
# Convert the packages to an array
IFS=$'\n' read -d '' -r -a package_array <<< "$packages"
total_packages=${#package_array[@]}
@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 June 29, 2025 13:01
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.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

#!/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.

@Winterhuman
Winterhuman / sisyphus.sh
Last active March 4, 2025 22:20
A script for finding the smallest lossless encoding of a PNG or GIF input image (that I know of).
#!/usr/bin/env -S unshare --pid --mount-proc --kill-child --map-root-user /bin/sh
# Licensed under the Zero-Clause BSD terms: https://opensource.org/license/0bsd
## Requires pngquant, oxipng, gifsicle, gif2apng, and optionally libwebp &
## perl-image-exiftool
## -C: Fail if redirects try to overwrite an existing file.
## -e: Fail if any command fails (with exceptions).
## -u: Fail if an unset variable tries to be expanded.
@jborean93
jborean93 / New-S4UAccessToken.ps1
Last active August 27, 2024 14:01
Generates a Win32 Access Token using S4U (no password required)
# Copyright: (c) 2023, Jordan Borean (@jborean93) <[email protected]>
# 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 June 22, 2025 11:19
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