Skip to content

Instantly share code, notes, and snippets.

@yogo1212
yogo1212 / gist:856eef9086f11240d42000788c18c13b
Created February 19, 2026 10:53
look up CT in Apple's log list
#!/bin/sh
# "A5:C9:78:92:5D:57:46:17:82:87:0D:D8:89:66:0B:5C:55:64:8B:7D:00:40:F2:EC:07:68:51:D1:88:69:19:F7"
hex_log_id="$1"
base64_log_id="$(ruby -e 'require "base64"; puts Base64.encode64(ARGV[0].split(":").map {|s| s.to_i(16).chr }.join)' "$hex_log_id")"
echo "base64: $base64_log_id"
curl "https://valid.apple.com/ct/log_list/current_log_list.json" | jq ".operators[] | .logs, .tiled_logs | .[] | select(.log_id == \"$base64_log_id\")"
@yogo1212
yogo1212 / PKGBUILD
Created January 17, 2025 14:41
ocrs PKGBUILD based on caleb@alerque.com's AUR package (fixed build process by removing cruft)
pkgname=ocrs
pkgver=0.9.0
pkgrel=1
pkgdesc='a modern OCR engine written in Rust'
arch=(x86_64)
url="https://github.com/robertknight/$pkgname"
license=(MIT Apache-2.0)
depends=(gcc-libs
glibc)
_tag="$pkgname-cli-v$pkgver"
@yogo1212
yogo1212 / PKGBUILD
Created January 17, 2025 14:37
rxing pkgbuild
pkgname=rxing
pkgver=0.6.1
pkgrel=1
pkgdesc='pure Rust port of ZXing'
arch=(x86_64)
url="https://github.com/rxing-core/$pkgname"
license=(MIT Apache-2.0)
depends=(gcc-libs
glibc)
#makedepends=(rust)
/*
* there were a lot of warnings when decompiling (missing range/reg, unexpected values).
* the header of the dtb says it's version 11.
*/
/dts-v1/;
/ {
compatible = "starfive,jh7110";
#address-cells = <0x02>;
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
blkcache - block cache diagnostics and control
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootefi - Boots an EFI payload from memory
bootelf - Boot from an ELF image in memory
booti - boot Linux kernel 'Image' format from memory
bootm - boot application image from memory
# Can't set block device
# Failed to load '/boot/uEnv.txt'
baudrate=115200
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootriscv64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
@yogo1212
yogo1212 / jh7110-pine64-star64.dts
Created February 25, 2024 13:33
Pine64 Star64 device tree for Linux v6.8-rc5-297-gf2e367d6ad3b
// not everything is tested.
// ideally, there'll be a 'no-overcurrent-detection;' for usb
/dts-v1/;
#include "jh7110.dtsi"
#include "jh7110-pinfunc.h"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>