Skip to content

Instantly share code, notes, and snippets.

View kreatoo's full-sized avatar
👀
I am doing the thing that does the thing

Kreato kreatoo

👀
I am doing the thing that does the thing
View GitHub Profile
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active February 17, 2026 14:46
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@SKaplanOfficial
SKaplanOfficial / now-playing.js
Last active February 11, 2026 10:51
AppleScript and JXA scripts to get Now Playing info. Works on macOS 15.4+, including macOS 26 beta 1.
function run() {
const MediaRemote = $.NSBundle.bundleWithPath('/System/Library/PrivateFrameworks/MediaRemote.framework/');
MediaRemote.load
const MRNowPlayingRequest = $.NSClassFromString('MRNowPlayingRequest');
const appName = MRNowPlayingRequest.localNowPlayingPlayerPath.client.displayName;
const infoDict = MRNowPlayingRequest.localNowPlayingItem.nowPlayingInfo;
const title = infoDict.valueForKey('kMRMediaRemoteNowPlayingInfoTitle');
@Linux4
Linux4 / gsi_tool_flasher.sh
Last active February 9, 2024 10:46
Flash GSIs or even full ROMs as DSU (full ROM only works if it is compatible with currently installed ROM's kernel)
#!/bin/bash
set -e
function unsparse_if_needed() {
if [ "$(file -b $1 | cut -f1 -d ',')" = "Android sparse image" ]; then
echo "Unsparsing..."
simg2img "$1" "$1".raw
mv "$1".raw "$1"
fi
}