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) |
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 |
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
func debug() { | |
let manager = ThingManager() | |
let thing1 = Thing(name: "thing1") | |
manager.addThing(thing1) | |
manager.sawSomeThing(named: thing1.name) | |
print("Manager has this many things: ", manager.things.count) | |
Timer.scheduledTimer(withTimeInterval: 10.0, repeats: false, block: { (timer) in | |
// By now, the manager should have forgotten about the thing | |
print("Manager has this many things: ", manager.things.count) | |
}) |
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
func debug() { | |
let manager = ThingManager() | |
let thing1 = Thing(name: "thing1") | |
manager.addThing(thing1) | |
manager.sawSomeThing(named: thing1.name) | |
print("Manager has this many things: ", manager.things.count) | |
Timer.scheduledTimer(withTimeInterval: 10.0, repeats: false, block: { (timer) in | |
// By now, the manager should have forgotten about the thing | |
print("Manager has this many things: ", manager.things.count) | |
}) |
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
// Not sure this all works | |
// I only use copyAsSockAddr which seems fine | |
extension sockaddr_in { | |
var addressString: String { | |
let sadr: UInt32 = self.sin_addr.s_addr | |
let b = (UInt8( sadr >> 24 ), | |
UInt8((sadr >> 16) & 0xff), | |
UInt8((sadr >> 8) & 0xff), | |
UInt8( sadr & 0xff)) |
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
diff --git a/lib/lighthouse.js b/lib/lighthouse.js | |
index f9a00c8..2a292e9 100644 | |
--- a/lib/lighthouse.js | |
+++ b/lib/lighthouse.js | |
@@ -2,11 +2,13 @@ var Netmask = require('netmask').Netmask | |
var dgram = require('dgram'); | |
var os = require('os'); | |
+var PORT = 3001; | |
+var MULTICAST_ADDR = "224.1.1.1"; |
This file has been truncated, but you can view the full file.
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
17:21 $ sudo gem update | |
Password: | |
Updating installed gems | |
Updating cocoapods | |
Fetching: cocoapods-core-1.0.0.gem (100%) | |
Successfully installed cocoapods-core-1.0.0 | |
Fetching: cocoapods-deintegrate-1.0.0.gem (100%) | |
Successfully installed cocoapods-deintegrate-1.0.0 | |
Fetching: cocoapods-downloader-1.0.0.gem (100%) | |
Successfully installed cocoapods-downloader-1.0.0 |
This file has been truncated, but you can view the full file.
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
17:20 $ pwd | |
/Users/lacy/Projects/GPUImage | |
✔ ~/Projects/GPUImage [master|⚑ 1] | |
17:20 $ git status | |
On branch master | |
Your branch is up-to-date with 'origin/master'. | |
nothing to commit, working directory clean | |
✔ ~/Projects/GPUImage [master|⚑ 1] | |
17:20 $ pod lib lint --allow-warnings --verbose |
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
// Pin names based on https://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf | |
int serial_clock_pin = 2; // SHCP, Shift register clock | |
int serial_data_pin = 4; // DS, Serial data input | |
int register_clock_pin = 6; // STCP, Storage Clock, finalizes a series of serial inputs | |
int clear_pin = 8; // MR, Clear / Reset all storage (active LOW) | |
int output_enable_pin = 10; // OE, Enable output (active LOW) otherwise all output pins are LOW | |
void setup() { | |
pinMode(serial_clock_pin, OUTPUT); |
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
Process: Xcode [2223] | |
Path: /Applications/Xcode.app/Contents/MacOS/Xcode | |
Identifier: com.apple.dt.Xcode | |
Version: 7.0 (8227) | |
Build Info: IDEFrameworks-8227000000000000~2 | |
App Item ID: 497799835 | |
App External ID: 813293765 | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Xcode [2223] |