View example.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.onload = function() { |
View gist:873d653f1ecec0456ea3f475b6e54f68
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
On (Lasts for 10 seconds): | |
hidapitester.exe --vidpid 340D/1710 --open --length 10 --send-output 0x0,0xFF,0x01,0x66,0xC8,0xFF,0xAD,0x52,0x81,0xD6 | |
Off: | |
hidapitester.exe --vidpid 340D/1710 --open --length 10 --send-output 0x0,0xFF,0x00,0x00,0x64,0x00,0x32,0x9E,0xD7,0x0D | |
Address: VID and PID (Vendor ID and Product ID) |
View Writer.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 CoreServices | |
import ImageIO | |
class Writer { | |
let output = NSTemporaryDirectory().appending("output.heic") | |
lazy var outputUrl: CFURL = { | |
return URL(fileURLWithPath: output) as CFURL | |
}() |
View SampleCode.xcconfig
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
// | |
// SampleCode.xcconfig | |
// | |
// The `SAMPLE_CODE_DISAMBIGUATOR` configuration is to make it easier to build | |
// and run a sample code project. Once you set your project's development team, | |
// you'll have a unique bundle identifier. This is because the bundle identifier | |
// is derived based on the 'SAMPLE_CODE_DISAMBIGUATOR' value. Do not use this | |
// approach in your own projects—it's only useful for sample code projects because | |
// they are frequently downloaded and don't have a development team set. |
View SRCopyableLabel.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
// | |
// SRCopyableLabel.swift | |
// | |
// Created by Stephen Radford on 08/09/2015. | |
// Copyright (c) 2015 Cocoon Development Ltd. All rights reserved. | |
// | |
import UIKit | |
class SRCopyableLabel: UILabel { |
View AudioEngine.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
// | |
// AudioEngine.swift | |
// TPI | |
// | |
// Created by Stephen Radford on 29/05/2017. | |
// Copyright © 2017 Cocoon Development Ltd. All rights reserved. | |
// | |
import Foundation | |
import AudioKit |
View gist:1fc2a1fe475e3f3a7ee9
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
providesPresentationContextTransitionStyle = true | |
definesPresentationContext = true | |
modalVc.modalPresentationStyle = .OverCurrentContext | |
presentViewController(modalVc, animated: true, completion: nil) |
View organisations.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
extension GitKit { | |
public class func getMyOrganisations() -> Observable<[Organisation]> { | |
guard let organisationsURL = GitKit.currentUser.value?.organizationsUrl else { return Observable.just([]) } | |
return Alamofire.request(.GET, (organisationsURL)) | |
.rx_responseJSON() | |
.map { response, json in | |
guard let array = json as? [[String:AnyObject]] else { return [] } |
View config.json
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
{ | |
"bridge": { | |
"name": "Homebridge", | |
"username": "CC:22:3D:E3:CE:30", | |
"port": 51826, | |
"pin": "031-45-154" | |
}, | |
"platforms": [ | |
{ | |
"platform" : "LiFxLAN", |
NewerOlder