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
#include <stdio.h> | |
int main(int argc, const char * argv[]) | |
{ | |
char input[] = { 0xFF, 0x81, 0xBD, 0xA5, 0xA5, 0xBD, 0x81, 0xFF }; | |
for (int i=0; i<8; i++) | |
{ | |
char hex = input[i]; | |
for (int j=0; j<8; j++) |
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
// | |
// MOPModel.m | |
// MormonPanus | |
// | |
// Created by Dalton Claybrook on 8/29/14. | |
// Copyright (c) 2014 Space Factory Studios. All rights reserved. | |
// | |
#import "MOPModel.h" | |
#import <objc/runtime.h> |
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
post_install do |installer| | |
installer.project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.name == 'BREnterprise' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution: The Carter Group LLC' | |
config.build_settings['PROVISIONING_PROFILE'] = '${BR_ENTERPRISE_PROVISIONING_PROFILE}' | |
end | |
end | |
end |
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
function handleGist(message, user, res) { | |
console.log('handling gist: ' + message); | |
var components = message.split(' '); | |
var gistID = null; | |
if (components.length >= 3) { | |
gistID = components[2]; | |
// gistID = '6eb377c7c7e22f4e7002'; | |
console.log('gistID: ' + gistID); |
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
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
super.prepareForSegue(segue, sender: sender) | |
guard let navController = segue.destinationViewController as? UINavigationController, | |
packController = navController.topViewController as? PackViewController | |
where segue.identifier == SegueID.Pack else { | |
return | |
} | |
packController.delegate = self |
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
// | |
// Copyright (c) 2016 Dalton Claybrook | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
func wordFromNum(_ num: Int) -> String { | |
let suffixes = ["th","st","nd","rd","th"] | |
var idx = min(num % 10, suffixes.count-1) | |
let tens = num % 100 | |
if tens > 10 && tens < 14 { | |
idx = 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
import UIKit | |
extension UIView { // Constraints | |
func constrainEdgesToSuperview() { | |
constrainEdgesToSuperview(with: .zero) | |
} | |
func constrainEdgesToSuperview(with inset: UIEdgeInsets) { | |
guard let superview=superview else { assertionFailure("must have a superview"); return } | |
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
class Tree<T: Comparable> { | |
let root: T | |
var left: Tree? | |
var right: Tree? | |
init(root: T) { | |
self.root = root | |
} | |
func search(value: T) -> Tree? { |
OlderNewer