Skip to content

Instantly share code, notes, and snippets.

View HocTran's full-sized avatar

hoc HocTran

View GitHub Profile
@HocTran
HocTran / ArrayTransform.swift
Created March 25, 2016 06:11 — forked from Jerrot/ArrayTransform.swift
Transform arrays with ObjectMapper to Realm's List type
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1
// Author: Timo Wälisch <[email protected]>
import UIKit
import RealmSwift
import ObjectMapper
import SwiftyJSON
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType {
typealias Object = List<T>
@HocTran
HocTran / ListTransform.swift
Created March 25, 2016 09:19
JSON array to Realm's List type with ObjectMapper
import Foundation
import ObjectMapper
import RealmSwift
class ListTransform<T:RealmSwift.Object where T:Mappable> : TransformType {
typealias Object = List<T>
typealias JSON = [AnyObject]
let mapper = Mapper<T>()
@HocTran
HocTran / KeyboardNotification.swift
Created March 29, 2016 11:14 — forked from kristopherjohnson/KeyboardNotification.swift
Swift convenience wrapper for the userInfo values associated with a UIKeyboard notification
import UIKit
/// Wrapper for the NSNotification userInfo values associated with a keyboard notification.
///
/// It provides properties that retrieve userInfo dictionary values with these keys:
///
/// - UIKeyboardFrameBeginUserInfoKey
/// - UIKeyboardFrameEndUserInfoKey
/// - UIKeyboardAnimationDurationUserInfoKey
/// - UIKeyboardAnimationCurveUserInfoKey
@HocTran
HocTran / darktable-workflow.md
Created September 8, 2020 16:55 — forked from eimajtrebor/darktable-workflow.md
My Darktable Workflow

My Darktable Workflow

Basic workflow

  • Copy a film roll (a directory of RAW images) into a directory on the machine running Darktable.
  • Import the film roll into Darktable.
  • Review the images using lighttable mode and remove any images that are beyond repair.
  • Take a snapshot of the image so we can do a before and after comparison.
  • Adjust the white balance.
  • Exposure compensation and recovery.