Skip to content

Instantly share code, notes, and snippets.

View colejd's full-sized avatar
🆒
beans

Jonathan Cole colejd

🆒
beans
View GitHub Profile
@humblehacker
humblehacker / make-opencv2-xcframework.md
Last active January 22, 2024 07:07
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 git@github.com: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
@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;
@mattt
mattt / UIViewControllerPreview.swift
Last active January 8, 2024 23:09
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()
}
@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
@romkatv
romkatv / Pure style for Powerlevel10k.md
Last active May 4, 2024 16:34
Pure style for Powerlevel10k

Powerlevel10k can generate the same prompt as Pure.

pure

Installation

git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
@marcan
marcan / canon-ef-protocol-notes.md
Last active May 7, 2024 16:22
Canon EF protocol notes

Testing done using a Canon EOS 600D and a Canon EF-S18-55mm f/3.5-5.6 IS II.

Pinout

  1. VBAT
  2. DET (common with P-GND on lens side)
  3. P-GND
  4. VDD
  5. DCL
  6. DLC
name download_total
AFNetworking 61983241
Fabric 50998892
Crashlytics 49667729
SDWebImage 45471101
Alamofire 42097177
CocoaLumberjack 36071914
Bolts 35294870
FirebaseInstanceID 30277793
FirebaseAnalytics 30254593
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)