Skip to content

Instantly share code, notes, and snippets.

View DreamingInBinary's full-sized avatar

Jordan Morgan DreamingInBinary

View GitHub Profile
//
// SidebarSearchView.swift
//
// Created by Jordan Morgan on 6/30/21.
//
import SwiftUI
struct SidebarSearchView: NSViewRepresentable {
typealias NSViewType = NSSearchField
@DreamingInBinary
DreamingInBinary / Best in Class iOS Checklist
Last active October 14, 2024 16:16
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
@DreamingInBinary
DreamingInBinary / UIView+BFRShimmering.m
Created August 14, 2018 20:10
UIView+BFRShimmering.m
//
// UIView+BFRShimmer.h
// BFRUtils
//
// Created by Jordan Morgan on 8/14/18.
// Copyright © 2018 Buffer. All rights reserved.
//
#import <UIKit/UIKit.h>
sudo cp -r /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/12.0\ \(16A5318d\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
@DreamingInBinary
DreamingInBinary / Demo.m
Last active February 22, 2018 18:48
Machine Learning Blog Post: Snip 3
#pragma mark - Private Classifiers
- (void)classifyWithModelForImage:(UIImage *)image completion:(void (^)(NSDictionary <NSString *, NSString *> *))completion {
dispatch_async(dispatch_get_global_queue(QOS_CLASS_UTILITY, 0), ^{
NSMutableDictionary *returnValues = [NSMutableDictionary new];
CVPixelBufferRef pixelBuffer = [self generatePixelBufferFromImage:image];
if (pixelBuffer == nil) {
completion(nil);
return;
@DreamingInBinary
DreamingInBinary / Inference.m
Created February 22, 2018 18:46
Machine Leaning Blog Post: Snip 2
//
// Inceptionv3.h
//
// This file was automatically generated and should not be edited.
//
#import <Foundation/Foundation.h>
#import <CoreML/CoreML.h>
#include <stdint.h>
@DreamingInBinary
DreamingInBinary / DownloadingAModel.m
Last active February 22, 2018 18:45
Machine Learning Blog Post: Snip 1
// Once you get the NSData from the download task from where you hosted the file...
#pragma mark - Local Storage
// A 4 Step Process
// 1) Save off the NSData of the Core ML model to a temporary spot
// 2) Compile the model from that URL, whic gives us another temporary URL of where it's compiled at
// 3) Create a permanent URL by appending the temporary URL that was generated. This is what initlizes stuff
// 4) Save the permanent URL for later use
- (void)saveModelData:(NSData *)data {
@DreamingInBinary
DreamingInBinary / ASDisplayNode+BFREmptyView.m
Created November 14, 2017 16:07
Empty data set for ASDisplayNode
//
// ASDisplayNode+BFREmptyView.m
// Buffer
//
// Created by Jordan Morgan on 10/27/17.
//
#import "ASDisplayNode+BFREmptyView.h"
#import <objc/runtime.h>
#import <AsyncDisplayKit/AsyncDisplayKit.h>
cp -r /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5278f\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/