Skip to content

Instantly share code, notes, and snippets.

@stek29
stek29 / findmy_json_to_opentagviewer_zip.py
Created June 11, 2026 02:43
convert findmy.py json and plist to opentagviewer zip file
#!/usr/bin/env python3
"""
Convert FindMy data into an OpenTagViewer-compatible zip archive.
Scans a directory for both FindMy.py JSON files and decrypted plist files,
deduplicates by accessory identifier, and produces a zip that can be imported
in the OpenTagViewer Android app.
The structure follows the wiki guide:
@stek29
stek29 / export-findmy-worklog.md
Created June 11, 2026 02:31
log of work done to get export-findmy working, see https://github.com/stek29/export-findmy.git

Worklog

Scope

Made the Find My export CLI buildable against published fork dependencies, fixed export filename collisions, improved Apple ID authentication and reuse, investigated the OpenBubbles upstream state, fixed the iCloud Keychain and PCS failures observed during live testing, fixed the naming-record association, split the resulting dependency changes into publishable fork commits, added interactive escrow bottle deletion, replaced the hardcoded device identity with

@stek29
stek29 / reading-list-exporter.ts
Created November 26, 2025 13:48
Safari Reading List exporter in JSON and CSV to migrate to Readeck
#!/usr/bin/env -S deno run --allow-read --allow-write
import { readAll } from "jsr:@std/io@0.225.2/read-all";
import { parseArgs } from "jsr:@std/cli@1.0.24/parse-args";
import { parse } from "npm:@plist/parse@1.1.0";
import { Value, Dictionary } from "npm:@plist/common@1.1.0";
async function readStdinAsArrayBuffer(): Promise<ArrayBuffer> {
const bytes = await readAll(Deno.stdin);
#define _GNU_SOURCE
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
@stek29
stek29 / blueprint_z2m_event_action.yaml
Created February 3, 2025 01:35
Home Assistant Blueprint to Trigger actions on Zigbee2MQTT events
---
blueprint:
name: Zigbee2MQTT Action Trigger
description: Trigger an action when a Zigbee2MQTT event occurs.
domain: automation
input:
event_entity:
name: Event Entity
description: "Select the Zigbee2MQTT event entity that will trigger this automation. It should have an `event_type` attribute, which will be checked for conditions."
selector:
@stek29
stek29 / hwcomru_06_01_solver.py
Created June 30, 2024 19:54
hardware.com.ru training 06_2024 pmod3 bruteforcer
import serial
import time
import argparse
import logging
import sys
"""
examples:
path.py --pinlen_min=6 --pinlen_max=6 --log_file l6_dbg.txt --progress
mp64 '?d?d?d?d?d?d' | path.py --infile=- --log_file l6_dbg.txt --progress
@stek29
stek29 / pivot_root_example.c
Created April 13, 2024 18:22
example on how to use pivot_root, and demonstration of fd's still being valid after pivot
#define _GNU_SOURCE
#include <sys/syscall.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sched.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
@stek29
stek29 / 0dnstest.go
Created April 3, 2024 14:17
dnstest -- query dns from different source ports range to debug network card losing packets from specific 5tuples
package main
import (
"flag"
"fmt"
"net"
"sync"
"github.com/miekg/dns"
)
@stek29
stek29 / optobw.sh
Created December 20, 2022 23:05
restore folder structure in Bitwarden after migrating from 1Password
#!/usr/bin/env bash
set -euo pipefail
# Step 0: Log in
if ! op whoami >/dev/null 2>/dev/null; then
eval "$(op signin)"
fi
if [ "$(bw status | jq -r .status)" != "unlocked" ]; then
@stek29
stek29 / k8sint.go
Created June 11, 2022 03:01
decode kubernetes internal etcd encoding to YAMLs
package main
import (
"fmt"
"io/ioutil"
"os"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apimachinery/pkg/runtime/serializer/json"