Skip to content

Instantly share code, notes, and snippets.

View ShawnBaek's full-sized avatar
🎯
Focusing

Shawn Baek ShawnBaek

🎯
Focusing
View GitHub Profile
@ShawnBaek
ShawnBaek / Apple_mobile_device_types.txt
Created September 22, 2019 02:17 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
iPhone5,1 : iPhone 5 (GSM)
@josephlord
josephlord / FetchedResultsControllerPublisher.swift
Created June 10, 2019 23:08
Making a Combine publisher from a FetchedResultsController
//
// FetchedResultsControllerPublisher.swift
// ListsModel
//
// Created by Joseph Lord on 09/06/2019.
// Copyright © 2019 Joseph Lord. All rights reserved.
//
import Foundation
import Combine
@fethica
fethica / ProductCodable.swift
Last active February 24, 2023 15:49
NSKeyedArchiver using Swift 4 Codable protocol
struct Product: Codable {
var title: String
var price: Double
var quantity: Int
init(title: String, price: Double, quantity: Int) {
self.title = title
self.price = price
self.quantity = quantity
}
@Sorix
Sorix / FRCCollectionViewDataSource.swift
Created October 10, 2017 23:15
NSFetchedResultsControllerDelegate for UICollectionView
protocol FRCCollectionViewDelegate: class {
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
}
class FRCCollectionViewDataSource<FetchRequestResult: NSFetchRequestResult>: NSObject, UICollectionViewDataSource, NSFetchedResultsControllerDelegate {
let frc: NSFetchedResultsController<FetchRequestResult>
weak var collectionView: UICollectionView?
weak var delegate: FRCCollectionViewDelegate?
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active April 5, 2025 15:33
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@ShawnBaek
ShawnBaek / bucket.json
Last active February 19, 2017 12:28
awsBucket
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Allow Public Access to All Objects",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::yourbucketname/*"
}
@hfossli
hfossli / Display.swift
Last active July 13, 2020 16:22
Display mode
import UIKit
public enum DisplayType {
case unknown
case iphone4
case iphone5
case iphone6
case iphone6plus
static let iphone7 = iphone6
static let iphone7plus = iphone6plus
@smoll
smoll / USING-DIFFMERGE.md
Last active March 28, 2025 01:01
Using DiffMerge as your git mergetool (for Mac OS X / macOS)
@AmbroiseCollon
AmbroiseCollon / LiveQuerryArray.swift
Created July 9, 2016 16:09
Parse Live Query tableview
import Foundation
import Parse
import ParseLiveQuery
extension _ArrayType where Generator.Element == PFObject {
mutating func updateWithEvent(event: Event<PFObject>) {
switch event {
case .Created(let object):
append(object)
case .Entered(let object):
ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR