Skip to content

Instantly share code, notes, and snippets.

@malicious
malicious / app-info.scpt
Created February 12, 2024 15:54
AppleScript to print current window/document, intended to show on MacBook Pro touchbar via MTMR.app
global frontApp, frontAppName, windowTitle
set resultString to "[no app]"
set frontAppName to ""
set windowTitle to ""
tell application "System Events"
try
set frontApp to first application process whose frontmost is true
@malicious
malicious / re-encrypt.py
Created November 16, 2022 01:55
Re-encrypts an iOS backup that's been decrypted by mvt-ios.
"""
Re-encrypts an iOS backup that's been decrypted by mvt-ios.
Depending on the iOS version of the backup, there may be files that were never
encrypted in the first place, which mvt-ios then skips over during decryption.
"""
import hashlib
import itertools
import json
import mmap
@malicious
malicious / say-time.sh
Created August 3, 2019 21:01
Say current time on macOS (in Chinese)
#!/bin/sh
set -x
# Current time as HH MM
# - force leading space, because hours under 10 have a leading space anyway
#
WHOLE_DATE_STRING=${1:-"$(date "+ %l %M %p" | sed 's/^[[:space:]]*//')"}
HOUR_STRING="$( echo "$WHOLE_DATE_STRING" | cut -d' ' -f1)"
@malicious
malicious / # weechat - 2018-04-22_22-37-24.txt
Created April 23, 2018 05:40
weechat on macOS 10.13.4 - Homebrew build logs
Homebrew build logs for weechat on macOS 10.13.4
Build date: 2018-04-22 22:37:24