Skip to content

Instantly share code, notes, and snippets.

@namazso
namazso / tofu_totp_export.md
Last active March 15, 2025 04:36
Export Tofu TOTP tokens

1. Exporting the secrets

Make an iTunes encrypted backup which contains the Keychain, where Tofu stores all the tokens.

2. Decrypting Keychain

You'll need irestore for decrypting the keychain. Use it like this:

irestore iPhone dumpkeys dump.txt
@jlian
jlian / hometheater-diagram.md
Last active October 20, 2024 13:02
Wiring diagram for my home theater

My home theater setup diagram

flowchart LR

    subgraph Media Closet
        subgraph Denon AVR X1700H
            AVR_HDMI1
            AVR_HDMI2
            AVR_HDMI3
@ryancdavison
ryancdavison / iPad-Pro-Magic-Keyboard-Portrait-Mode-DIY-Smart-Connector-Cable.md
Last active April 3, 2025 15:36
iPad Pro 12.9 (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

iPad Pro 12.9" (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

I wanted my iPad Pro to be able to use the Magic Keyboard in portrait mode, but the current Smart Connector configuration does not allow this. With too much time on my hands, I made a short jumper cable using a section of USB cable, 5-pin POGO connectors (the 5-pin works using pins 1, 3, and 5, and removing pins 2 and 4), a small electrical project box, 3mm N52 magnets, and some epoxy and Sugru to pack everything into place. My cable and connections orientation had more to do with the boxes I found to encase the connector (with holes on the small end) than anything else. Obviously, there will be many ways to do this.

WARNING: Getting any of these steps wrong will probably ruin your iPad.

Note: These measurements are for the 12.9" (2020) model. The magnets did not line up and the polarity was different for my wife's iPad Pro 11" (2021).

![iPad-Pro-MmagicKeyboard-Jumper-Cable-min](https://user-images.githubusercontent.c

@coughski
coughski / subway_widget.js
Created April 8, 2022 19:50
A NYC subway departure timeline widget with status alerts
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: subway;
let GtfsRealtimeBindings = importModule("gtfs-realtime.js") // add this file to Scriptable from https://github.com/MobilityData/gtfs-realtime-bindings/blob/master/nodejs/gtfs-realtime.js
// also add https://github.com/protobufjs/protobuf.js/blob/master/dist/protobuf.min.js to Scriptable
const API_KEY = "paste_your_api_key_here" // get a free MTA API key at https://api.mta.info/#/landing
const ROOT = "entity"
const ALERT = "alert"
@coughski
coughski / citi_bike.js
Last active January 20, 2024 06:24
Scriptable widget for tracking the status of a Citi Bike station
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: bicycle;
/*** WIDGET SETUP ***
* Edit the Scriptable widget, select this CitiBike script, and fill the Parameter field with your station's id
*
* HOW TO FIND A STATION'S ID
* Search for a CitiBike station by street name at https://gbfs.citibikenyc.com/gbfs/en/station_information.json
* Find the station_id field associated with the name
@Normal-Tangerine8609
Normal-Tangerine8609 / horizontal-rule.js
Created December 9, 2021 12:19
Add Horizontal Rules To Scriptable Widgets
/*
Call
ListWidget.addHr()
WidgetStack.addHr()
Return
WidgetHorizontalRule
Properties
color: Color
@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active May 2, 2025 02:50
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@import Darwin;
@import ObjectiveC;
@import CloudKit;
extern bool GEOConfigGetBOOL(int feature, void* something);
// Hooks feature flags in a resigned Maps.app to return true.
// Usage:
// clang -shared -fmodules -o libmaps_inject.dylib maps_inject.m \
// "$(xcrun
@dhinakg
dhinakg / tutorial.md
Last active September 16, 2024 13:12
iOS/iPadOS 14.3 OTA
@mzeryck
mzeryck / mz_invisible_widget.js
Last active April 17, 2025 15:54
A Scriptable script that creates "invisible" widget backgrounds based on your iOS wallpaper, and then either uses them as a Scriptable widget background or exports to your camera roll.
/*
MIT License
Copyright (c) 2024 Maxwell Zeryck
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTW