This file contains hidden or 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
// | |
// NetworkFetcher.swift | |
// | |
// Created by C. Bess on 8/7/16. | |
// Pulled from original NetworkFetcher (cleaned up and updated) | |
import Haneke | |
public class NetworkFetcher<T: DataConvertible>: Fetcher<T> { | |
let URL: NSURL |
This file contains hidden or 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
/// Represents parts of time | |
struct TimeParts: CustomStringConvertible { | |
var seconds = 0 | |
var minutes = 0 | |
/// The string representation of the time parts (ex: 07:37) | |
var description: String { | |
return NSString(format: "%02d:%02d", minutes, seconds) as String | |
} | |
} |
This file contains hidden or 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
0414d7866d0a60e68d55f5271d9cf498468f55a811efecbaf9324023678a22ab74a12d58849eb76eb52071a42589bf9ab883d9b7d441b14f6d444522771bb99b16;andrewallaway |
This file contains hidden or 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
// ref: https://www.npmjs.com/package/pdf-parse | |
const pdf = require('pdf-parse'); // v1.0.8 | |
// ref: https://www.npmjs.com/package/axios | |
const axios = require('axios'); // v0.18.0 | |
const util = require('util'); | |
const url = 'http://www.trinitybaptistreformed.org/files/Download/Doctrine%20of%20Divine%20Providence.pdf'; | |
// const url = 'http://www.orrb.org/ourpages/theology_training/UNIT%201%20-%20THE%20ATTRIBUTES%20OF%20GOD/U1S18_gods_wrath.pdf'; | |
console.log('loading'); |
This file contains hidden or 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
// ref: https://stackoverflow.com/a/22967912/344591 | |
@implementation NSView (Screenshot) | |
/// Returns an image that contains the entire window contents, including window background color and traffic lights. | |
/// Resembles the product of taking a screenshot using Preview.app | |
- (NSImage *)screenshotOfWindow { | |
CGWindowID winID = (CGWindowID) self.window.windowNumber; | |
CGImageRef ref = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, winID, kCGWindowImageBoundsIgnoreFraming); | |
return [[NSImage alloc] initWithCGImage:ref size:self.bounds.size]; |
This file contains hidden or 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
# use LLVM defaults | |
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html#configurable-format-style-options | |
# BasedOnStyle: LLVM | |
# Soli Deo gloria | |
Language: ObjC | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlines: Left |
This file contains hidden or 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
// | |
// DispatchQueueDelay.swift | |
// | |
// Created by C. Bess on 9/17/19. | |
// MIT - Soli Deo gloria - perfectGod.com | |
// | |
// refs: | |
// - https://gist.github.com/fjcaetano/ff3e994c4edb4991ab8280f34994beb4 | |
// - https://www.craftappco.com/blog/2018/5/30/simple-throttling-in-swift |