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
// | |
// BJUPortraitLayout.h | |
// BizjournalsUniversal | |
// | |
// Created by Wess Cope on 1/7/13. | |
// Copyright (c) 2013 ACBJ. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
// | |
// BJUPortraitLayout.m | |
// BizjournalsUniversal | |
// | |
// Created by Wess Cope on 1/7/13. | |
// Copyright (c) 2013 ACBJ. All rights reserved. | |
// | |
#import "BJUPortraitLayout.h" | |
#import "Archimedes.h" |
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
// | |
// WCMacros.h | |
// WessCioe | |
// | |
// Created by Wess Cope on 10/9/12. | |
// Copyright (c) 2012 WessCope. All rights reserved. | |
// | |
#ifndef __WC__MACROS__ | |
#define __WC__MACROS__ |
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
NSMutableDictionary *generateQueryPartForPredicate(NSPredicate *predicate) | |
{ | |
NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; | |
if([predicate isKindOfClass:[NSCompoundPredicate class]]) | |
{ | |
NSCompoundPredicate *compoundPredicate = (NSCompoundPredicate *)predicate; | |
for(NSComparisonPredicate *comparison in compoundPredicate.subpredicates) | |
[params setValue:comparison.rightExpression.constantValue forKey:comparison.leftExpression.keyPath]; |
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
@implementation UITextView (Annex) | |
@dynamic visibleTextRange; | |
- (NSRange)visibleTextRange | |
{ | |
CGRect bounds = self.bounds; | |
CGSize textSize = [self.text sizeWithFont:self.font constrainedToSize:bounds.size]; | |
UITextPosition *start = [self characterRangeAtPoint:bounds.origin].start; |
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
ps aux | grep \(YOUR_APP_NAME_HERE\) | awk '{print "kill -9 " $2}' | sh |
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
// The MIT License (MIT) | |
// | |
// Copyright (c) 2013 Wess Cope | |
// | |
// 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 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
static AnnexEasingBlock AnnexEaseInQuad = ^CGFloat(AnnexEasingProperty property) { | |
CGFloat t = property.time, | |
b = property.start, | |
c = property.delta, | |
d = property.duration; | |
return c * (t /= d) * (t + b); | |
}; |
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
UIView *view = [[UIView alloc] initWithFrame:({ | |
//do some calculations if needed to create your frame. | |
CGRect frame = CGRectZero; | |
frame.origin.x = 123.0f; | |
frame.origin.y = 12.0f; | |
frame.size.width = 100.0f; | |
frame.size.height = 100.0f; |
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
### Keybase proof | |
I hereby claim: | |
* I am wess on github. | |
* I am wess (https://keybase.io/wess) on keybase. | |
* I have a public key whose fingerprint is 37EF CD5E 6CA3 1720 4420 B656 BBFD AE20 EBFF 3CFA | |
To claim this, I am signing this object: |