Skip to content

Instantly share code, notes, and snippets.

View m4p's full-sized avatar

Martin Pittenauer m4p

View GitHub Profile
@KhaosT
KhaosT / HDMI on Apple Vision Pro.md
Last active May 9, 2024 08:11
Guide for using Apple Vision Pro as HDMI display

Displaying HDMI sources on Apple Vision Pro

While it's possible to stream most content to Apple Vision Pro directly over the internet, having the ability to use Apple Vision Pro as an HDMI display can still be useful.

Since Apple Vision Pro does not support connecting to an HDMI input directly or using an HDMI capture card, we have to be a little creative to make this work. NDI provides the ability to stream HDMI content over a local network with really low latency, and it works great with Apple Vision Pro.

This page shows the setup I’m using.

@hugeblank
hugeblank / tiktok.sh
Last active December 31, 2023 23:09
Tiktok speech to text parser
#!/bin/zsh
# Tiktok speech to text parser
# by hugeblank, April 2022
# API endpoint & oneshot reading and playing discovered by @scanlime
# https://twitter.com/scanlime/status/1512288857596653568
# First argument - string of text to read
# Second argument - voice to use
# Usage examples:
@krzysztofzablocki
krzysztofzablocki / debugDiffing.swift
Created August 18, 2021 18:28
Higher order reducer for TCA that enables better debugging
import ComposableArchitecture
import Difference
import Foundation
/// A container for storing action filters.
///
/// The logic behind having this rather than a normal closure is that it allows us to namespace and gather action filters together in a consistent manner.
/// - Note: You should be adding extensions in your modules and exposing common filters you might want to use to focus your debugging work, e.g.
/// ```swift
/// extension ActionFilter where Action == AppAction {
https://www.osstatus.com
-12884 - Media File not received
code -1008, underlying -12884 - Playlist File not received
-11819 AVErrorMediaServicesWereReset with NSOSStatusErrorDomain Code=-12178, solution: rebuild AVPlayer|Item and asset
HTTP | errorStatusCode | errorDomain | errorComment
204 -12667 CoreMediaErrorDomain HTTP 204: (unhandled)
400 -12666 CoreMediaErrorDomain unrecognized http response 400
@xuio
xuio / buergerbot.rb
Last active May 24, 2023 20:59 — forked from pbock/buergerbot.rb
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you via Telegram
#!/usr/bin/env ruby
require 'watir-webdriver'
require 'telegram/bot'
Telegram.bots_config = {
default: '<Telegram Bot token>',
}
Telegram.bot.get_updates
@DreamingInBinary
DreamingInBinary / Best in Class iOS Checklist
Last active January 29, 2024 18:18
This is a public checklist updated every year after the latest version of iOS and iPadOS are shipped. It's a boiled down version of a "Best in Class" app checklist created by Jordan Morgan.
# A Best in Class Checklist
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10.
> To use this, create a Github Issue in your own repo, and simply copy and paste this text.
## iOS Core Technology
_Things any iOS app can benefit from_
- [ ] iCloud Sync
- [ ] Focus Filter Support
@propertyWrapper
public struct AnyProxy<EnclosingSelf, Value> {
private let keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value>
public init(_ keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value>) {
self.keyPath = keyPath
}
@available(*, unavailable, message: "The wrapped value must be accessed from the enclosing instance property.")
public var wrappedValue: Value {
@mattt
mattt / main.swift
Last active May 4, 2024 11:22
NaturalLanguage Framework - NLTagger Language Support Matrix
import NaturalLanguage
let languages: [NLLanguage] = [
.amharic, .arabic, .armenian, .bengali, .bulgarian,
.burmese, .catalan, .cherokee, .croatian, .czech,
.danish, .dutch, .english, .finnish, .french,
.georgian, .german, .greek, .gujarati, .hebrew,
.hindi, .hungarian, .icelandic, .indonesian, .italian,
.japanese, .kannada, .khmer, .korean, .lao,
.malay, .malayalam, .marathi, .mongolian, .norwegian,
//
// BottomSheetView.swift
//
// Created by Majid Jabrayilov
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
fileprivate enum Constants {
static let radius: CGFloat = 16
@mwahlig
mwahlig / ZipManyPublisher.swift
Last active February 17, 2024 02:15
a Combine Publisher that allows for zipping an array of publishers while maintaining their index
extension Publishers {
private struct IndexedResult<T> {
let index: Int
let result: T
}
private struct IndexedPublisher<Upstream>: Publisher where Upstream: Publisher {
typealias Output = IndexedResult<Upstream.Output>
typealias Failure = Upstream.Failure