Skip to content

Instantly share code, notes, and snippets.

@narner
narner / ARKitMultiCamTestViewController.swift
Last active December 16, 2022 19:30
ARKit + MultiCam Test for iOS 13 - Not Successful
//
// ViewController.swift
// test
//
// Created by Nicholas Arner on 9/19/19.
// Copyright © 2019 NFA. All rights reserved.
//
import UIKit
import SceneKit
@mattt
mattt / UIViewControllerPreview.swift
Last active December 3, 2024 07:42
Generic structures to host previews of UIView and UIViewController subclasses.
import UIKit
#if canImport(SwiftUI) && DEBUG
import SwiftUI
struct UIViewControllerPreview<ViewController: UIViewController>: UIViewControllerRepresentable {
let viewController: ViewController
init(_ builder: @escaping () -> ViewController) {
viewController = builder()
}
@SabinT
SabinT / GenericComputeShaderDriver.cs
Last active February 7, 2023 22:34
Unity3D: Generic template to pass options to a compute shader and dispatch; avoids common boilerplate of Shader.PropertyToID and shader.SetInt etc
using EasyButtons;
namespace Lumic.Compute
{
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using UnityEngine;
@humblehacker
humblehacker / make-opencv2-xcframework.md
Last active May 23, 2025 14:18
Make opencv2.xcframework for iOS arm64, and iOSSimulator arm64 & x86_64

I had some trouble attempting to build an XCFramework of OpenCV, but I finally got a successful build with the following steps:

  1. Clone the OpenCV repo:
    git clone [email protected]:opencv/opencv.git
    cd opencv
    
  2. Disable building with libjpeg-turbo[^1] by applying a patch:
    git apply path/to/opencv-5-28-50.patch