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
opena(){ | |
if test -n "$(find . -maxdepth 1 -name '*.xcworkspace' -print -quit)" | |
then | |
echo "Opening workspace" | |
open *.xcworkspace -a /Applications/AppCode.app | |
return | |
else | |
if test -n "$(find . -maxdepth 1 -name '*.xcodeproj' -print -quit)" | |
then | |
echo "Opening project" |
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 <Kiwi/Kiwi.h> | |
#import "WGTitleView.h" | |
//открываем доступ к внутренним свойствам | |
@interface WGTitleView () | |
@property (strong, nonatomic) UILabel *titleLabel; | |
@property (strong, nonatomic) UILabel *subtitleLabel; |
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
void (^stubResponseWithHeaders)(NSString *, NSString *, NSDictionary *); | |
void (^stubResponse)(NSString *, NSString *); | |
void (^stubResponseWithStatusCode)(NSString *, int); |
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
typedef NSCachedURLResponse * (^WGNCachedResponseBlock)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse); | |
- (WGNCachedResponseBlock)cacheResponseBlockWithTime:(NSTimeInterval)time { | |
return ^NSCachedURLResponse *(NSURLConnection *connection, NSCachedURLResponse *cachedResponse) { | |
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)[cachedResponse response]; | |
NSDictionary *headers = [httpResponse allHeaderFields]; | |
NSString *cacheControl = [headers valueForKey:@"Cache-Control"]; | |
NSString *expires = [headers valueForKey:@"Expires"]; | |
if((cacheControl == nil) && (expires == nil)) { |
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
- (RACSignal *)enqueueRequestWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters cacheTime:(NSTimeInterval)expirationTime { | |
NSAssert(self.cluster, @"cluster should be set before request."); | |
NSAssert(self.applicationID.length != 0, @"applicationID should be set before request."); | |
NSMutableURLRequest *request = [self requestWithMethod:method path:path parameters:parameters]; | |
RACSignal *signal = [RACSignal createSignal:^(id<RACSubscriber> subscriber) { | |
AFHTTPRequestOperation *operation; | |
operation = [self HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *op, id JSON) { | |
NSDictionary *errorDictionary = JSON[@"error"]; |
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 "KWHCMatcher.h" | |
#import "KWMessageTracker.h" | |
#import "Kiwi.h" | |
@interface NSNotificationMatcher : NSObject <HCMatcher> | |
{ | |
NSDictionary *_userInfo; | |
} | |
+ (id)matcherWithUserInfo:(NSDictionary *)dictionary; |
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
+ (id)alloc | |
{ | |
MAObject *obj = calloc(1, class_getInstanceSize(self)); | |
obj->isa = self; | |
obj->retainCount = 1; | |
return obj; | |
} |
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
// | |
// TestSemaphor.h | |
// BillsApp | |
// | |
// Created by Marin Todorov on 17/01/2012. | |
// Copyright (c) 2012 Marin Todorov. All rights reserved. | |
// | |
#import <Foundation/Foundation.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
// | |
// PorterStemmer.h | |
// PorterStemmer | |
// | |
// Created by Denis Lebedev on 11/5/12. | |
// Copyright (c) 2012 Denis Lebedev. All rights reserved. | |
// | |
#import <Foundation/Foundation.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
// | |
// DLBaseTableViewCell.h | |
// Kawiky | |
// | |
// Created by Denis Lebedev on 2/24/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
@interface DLBaseTableViewCell : UITableViewCell |