Skip to content

Instantly share code, notes, and snippets.

@patrickgill
patrickgill / m3u8download.sh
Last active March 28, 2024 17:50
download m3u8 ts segments, then decode, join, and remux them! (HTTP Live Streaming TS files)
# download
aria2c -x 5 -i file.m3u8
# decode (example)
openssl aes-128-cbc -d -K 15D0F46608409DA364E3F5D92BDE9F61 -iv 00000000000000000000000000000000 -nosalt -in G00000000.ts -out G00000000.d.ts
# join all ts files
cat *.ts > out.ts
# convert ts output file
Installer activation:
The password is the CRC-32 hash of the username
i.e.
user
0x8D93D649
@patrickgill
patrickgill / ASD
Last active April 27, 2023 05:44
3S106
iMac (Early 2006 17-inch):3S106
iMac (Early 2006 20-inch):3S106
MacBookPro (15-inch):3S106
MacBookPro (17-inch):3S106
Mac mini (Early 2006):3S106
MacBook (13-inch):3S106
iMac (Mid 2006 17- inch):3S106
Xserve (Early 2008):3X106
Xserve (Early 2009):3X106
@patrickgill
patrickgill / macos_usb_installer.txt
Last active October 25, 2021 17:11
macOS Installer USB preparation
download full installer on Catalina and above:
softwareupdate --fetch-full-installer
also download specific version:
softwareupdate --fetch-full-installer --full-installer-version 10.14.6
macOS 12 Monterey
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled
macOS 11 Big Sur
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled
# download the latest ‘Install macOS’ application to this Mac’s /Applications folder.
softwareupdate --fetch-full-installer
# download a specific macOS insatller version
softwareupdate --fetch-full-installer --full-installer-version 10.14.6
Mac OS Launch paths
~/Library/LaunchAgents
User Agents, Currently logged in user
/Library/LaunchAgents
Global Agents, Currently logged in user
/Library/LaunchDaemons
Global Daemons, root or the user specified with the key UserName
brew install gcc curl dfu-util gdb-multiarch git python python-pip
# install gcc-arm-none-eabi from
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
mkdir -p /usr/local && cd /usr/local
tar xjf gcc-arm-none-eabi-8-2019-q3-update-mac.tar.bz2
PATH=$PATH:/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin
git clone https://github.com/jsnyder/stm32loader
Make a MacOS .iso from an installer
from https://www.geekrar.com/create-macos-catalina-iso-file/
Catalina example
Create a DMG Disk Image
hdiutil create -o /tmp/Catalina -size 8500m -volname Catalina -layout SPUD -fs HFS+J
Mount it to your macOS
hdiutil attach /tmp/Catalina.dmg -noverify -mountpoint /Volumes/Catalina