Skip to content

Instantly share code, notes, and snippets.

@dmthomas
dmthomas / Apple Special Event March 2022 1080p, 1440p, 2160p
Last active April 6, 2023 01:39
Apple Special Event March 2022 1080p, 1440p, 2160p
#I broke the audio out separately because it's the same stream regardless of which video resolution you choose.
#Audio for all
ffmpeg -i https://events-delivery.apple.com/1402uekefjejgldkvaqrqxgjmtehwhez/vod_main_FmkzTaRUQHbdgFMjhhirKrarNznPoHEC/audio_main_en_2ch_aac_128/prog_index.m3u8 -c copy "Apple Special Event, March 2022 temp.aac"
#Dolby Atmos Audio... wut? Audio file must end in .mp4 for ffmpeg to download it correctly. If you want to use Dolby Atmos audio modify the second line of any video format section to use the .mp4 audio file in the merge command.
ffmpeg -i https://events-delivery.apple.com/1402uekefjejgldkvaqrqxgjmtehwhez/vod_main_FmkzTaRUQHbdgFMjhhirKrarNznPoHEC/audio_main_en_16ch_atmos_640/prog_index.m3u8 -c copy "Apple Special Event, March 2022 temp atmos.mp4"
#h264 1080p
ffmpeg -i https://events-delivery.apple.com/1402uekefjejgldkvaqrqxgjmtehwhez/vod_main_FmkzTaRUQHbdgFMjhhirKrarNznPoHEC/sdr_avc_1080p_8500/prog_index.m3u8 -c copy "Apple Special Event, March 2022 (1080p) temp.mp4"
import Foundation
import SwiftUI
extension Published:Decodable where Value:Decodable {
public init(from decoder: Decoder) throws {
let decoded = try Value(from:decoder)
self = Published(initialValue:decoded)
}
}
@slykar
slykar / docker-compose-hackintosh.md
Last active May 7, 2024 13:53
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@stinger
stinger / CombineFetcher.swift
Last active January 28, 2023 18:07
Combine - fetching data using URLSession publishers
import Foundation
import Combine
enum APIError: Error, LocalizedError {
case unknown, apiError(reason: String)
var errorDescription: String? {
switch self {
case .unknown:
return "Unknown error"
@yifanlu
yifanlu / Ghidra-OSX-Launcher-Script.scpt
Last active April 4, 2024 21:00
Ghidra.app launcher for OSX
@XLNCs
XLNCs / AdobeFixAMD
Last active March 21, 2024 15:33
To fix adobe products crashes on AMD hackintosh
MOVED HERE:
https://gist.github.com/naveenkrdy/26760ac5135deed6d0bb8902f6ceb6bd
@vre2h
vre2h / normalize.md
Last active May 21, 2024 20:54
Simple guide to adding normalize.css to create-react-app
  1. Install normalize.css via npm
npm install --save normalize.css

1.1 Or yarn

yarn add normalize.css
@bagpack
bagpack / X509.swift
Created February 16, 2018 06:48
X.509/P12
enum X509Error: Error {
case certificateError(message: String)
case publicKeyError(message: String)
}
class X509 {
// A DER (Distinguished Encoding Rules) representation of an X.509 certificate.
let publicKey: SecKey
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 22, 2024 05:57 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@saoudrizwan
saoudrizwan / Storage.swift
Last active October 27, 2021 01:51
Helper class to easily store and retrieve Codable structs from/to disk. https://medium.com/@sdrzn/swift-4-codable-lets-make-things-even-easier-c793b6cf29e1
import Foundation
public class Storage {
fileprivate init() { }
enum Directory {
// Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud.
case documents