View ImageUtil.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Photos | |
typealias AssetID = String | |
class ImageUtil { | |
static var defaultAlbumName = "App Name" | |
static var videosAlbumName = "App Name Videos" |
View CGImageMetadata.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import MobileCoreServices | |
import ImageIO | |
let sourceOptions: [String: AnyObject] = [kCGImageSourceTypeIdentifierHint as String: kUTTypeJPEG] | |
let cfSourceOptions = sourceOptions as CFDictionary | |
let image = UIImage(named: "input.jpg")! | |
let data = UIImageJPEGRepresentation(image, 1.0) |
View SceneKitToVideo.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// LiveFrameCaptureViewController.swift | |
// SCNKit2Video | |
// | |
// Created by Lacy Rhoades on 11/29/16 | |
// Revised 7/19/17 | |
// Copyright © 2017 Lacy Rhoades. All rights reserved. | |
// | |
import Foundation |
View lpinfo.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsb/usr/cupsfilters/Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd Fuji Xerox | |
gutenprint.5.2://pcl-apollo-p2100/expert Apollo P-2100 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apollo-p2150/expert Apollo P-2150 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apollo-p2200/expert Apollo P-2200 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apollo-p2250/expert Apollo P-2250 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apollo-p2500/expert Apollo P-2500 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apollo-p2550/expert Apollo P-2550 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apollo-p2600/expert Apollo P-2600 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apollo-p2650/expert Apollo P-2650 - CUPS+Gutenprint v5.2.12-pre3 | |
gutenprint.5.2://pcl-apple-4100/expert Apple Color StyleWriter 4100 - CUPS+Gutenprint v5.2.12-pre3 |
View Persistable.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Persistable.swift | |
// | |
import Foundation | |
import Disk | |
public protocol Persistable: Codable { | |
init() | |
init?(_: [String: Any]) |
View PopArtFilter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let group = GPUImageFilterGroup() | |
let contrastFilter = GPUImageContrastFilter() | |
contrastFilter.contrast = FoboCore.Context.sceneManager.popArtContrastLevel | |
let colorFilter = GPUImageFalseColorFilter() | |
colorFilter.firstColor = GPUVector4(FoboCore.Context.sceneManager.popArtColor.first) | |
colorFilter.secondColor = GPUVector4(FoboCore.Context.sceneManager.popArtColor.second) | |
group.initialFilters = [contrastFilter] |
View PopArtColor.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct PopArtColor { | |
public var first: UIColor | |
public var second: UIColor | |
public static let colorIterator = InfiniteIterator(PopArtColor.allColors) | |
public static let allColors: [PopArtColor] = [ | |
PopArtColor(first: UIColor((154, 99, 141)), second: UIColor((233, 223, 122))), | |
PopArtColor(first: UIColor((215, 68, 74)), second: UIColor((165, 210, 153))), | |
PopArtColor(first: UIColor((69, 74, 174)), second: UIColor((171, 171, 207))), |
View Constraints.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// viewA is INSIDE OF or a SIBLING OF viewB | |
let viewA: UIView = ... | |
let viewB: UIView = ... | |
// Create constraint like... | |
let constraint = NSLayoutConstraint(item: viewA, attribute: .height, relatedBy: .equal, toItem: viewB, attribute: .height, multiplier: 1, constant: 0) | |
// or | |
let constraints = NSLayoutConstraint.constraints(withVisualFormat: "V:|-(margin)-[view]-(margin)-|", options: [], metrics: ["margin": 15.0], views: ["view": viewA]) |
View 01-PrintConfigViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PrintConfigViewController.swift | |
// Fobo | |
// | |
// Created by Lacy Rhoades on 8/24/18. | |
// | |
import UIKit | |
protocol PrintConfigViewControllerDelegate: class { |
View TwilioEncoding.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct TwilioEncoding: ParameterEncoding { | |
static var totallyNormal = TwilioEncoding() | |
// Twilio requires this weird encoding for arrays | |
func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { | |
var request = try URLEncoding().encode(urlRequest, with: parameters) | |
if let data = request.httpBody, let string = String(data: data, encoding: .utf8) { | |
let replaced = string.replacingOccurrences(of: "%5B%5D=", with: "=") | |
request.httpBody = replaced.data(using: .utf8) | |
} |
NewerOlder