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
// | |
// UIViewController+StatusBar.swift | |
// StatusBarTesApp | |
// | |
// Created by Jonathan Cardasis (C) on 7/10/18. | |
// Copyright © 2018 Jonathan Cardasis. All rights reserved. | |
// | |
import UIKit |
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
#!/usr/local/bin/python | |
# Jonathan Cardasis, 2018 | |
# | |
# Cleans up a collada `dae` file removing all unnessasary data | |
# only leaving animations and bone structures behind. | |
# Combines multiple animation sequences into a single animation | |
# sequence for Xcode to use. | |
import sys | |
import os | |
import re |
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
extension UIFont { | |
/** | |
Will return the best font conforming to the descriptor which will fit in the provided bounds. | |
*/ | |
static func bestFittingFontSize(for text: String, in bounds: CGRect, fontDescriptor: UIFontDescriptor, additionalAttributes: [NSAttributedStringKey: Any]? = nil) -> CGFloat { | |
let constrainingDimension = min(bounds.width, bounds.height) | |
let properBounds = CGRect(origin: .zero, size: bounds.size) | |
var attributes = additionalAttributes ?? [:] | |
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
import os, sys | |
import re | |
import base64 | |
import hashlib | |
import plistlib | |
from binascii import unhexlify | |
class FVPasswordManager(object): | |
PL_SALTED_HASH_ARRAY_KEY = 'SALTED-SHA512-PBKDF2' |
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
// | |
// ssltest.swift | |
// | |
// Created by Cardasis, Jon C. (CAC) on 1/22/18. | |
// Copyright © 2018 Jon Cardasis. All rights reserved. | |
// | |
import OpenSSL | |
import Security |
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
#!/bin/bash | |
# Jonathan Cardasis - 2018 | |
# Builds OpenSSL libssl and libcrypto for macOS | |
# binary distribution (i386 and x86). | |
VERSION="1.1.0g" | |
VERSION_SHA256_CHECKSUM="de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af" | |
#################################### | |
curl -O https://www.openssl.org/source/openssl-$VERSION.tar.gz |
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
// | |
// DebugLogger.swift | |
// | |
// Created by Jonathan Cardasis. on 1/1/18. | |
// Copyright ©2018 Jonathan Cardasis. All rights reserved. | |
// | |
#if DEBUG | |
import Foundation |
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
import SystemConfiguration | |
/** | |
Retrieve the console username of the user running the program. | |
Will be the same result as a `whoami` command. | |
*/ | |
public func systemConsoleUsername() -> String? { | |
var uid: uid_t = 0 | |
var gid: gid_t = 0 |
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
import UIKit | |
extension UIFont { | |
/** | |
Will return the best approximated font size which will fit in the bounds. | |
If no font with name `fontName` could be found, nil is returned. | |
*/ | |
static func bestFitFontSize(for text: String, in bounds: CGRect, fontName: String) -> CGFloat? { | |
var maxFontSize: CGFloat = 32.0 // UIKit best renders with factors of 2 |