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
// | |
// UITableView+HLTEnumarateCells.h | |
// | |
// Created by Maciej Banasiewicz. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UITableView (HLTEnumarateCells) | |
- (void)enumarateTableViewCellsUsingBlock:(void(^)(UITableViewCell *))blk; |
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
// | |
// NSObject+LogProperties.h | |
// | |
// Gist created by Maciej Banasiewicz. | |
// Log all properties of an object. | |
// Credits: Tieme | |
// Source: http://stackoverflow.com/questions/13922581/is-there-a-way-to-log-all-the-property-values-of-an-objective-c-instance | |
#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
// This goes in some global header, let it be *.pch | |
#define SuppressPerformSelectorLeakWarning(Stuff) \ | |
do { \ | |
_Pragma("clang diagnostic push") \ | |
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \ | |
Stuff; \ | |
_Pragma("clang diagnostic pop") \ | |
} while (0) | |
// And then in any method you just call this function |
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 <Foundation/Foundation.h> | |
@interface NSString (URLHelper) | |
- (NSURL *)urlFromString; | |
@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
// | |
// UIView+GetColor.swift | |
// SwiftPick | |
// | |
// Created by Maciej Banasiewicz, Michał Apanowicz on 06/07/14. | |
// | |
// | |
import UIKit |
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
find . -name "*.m" -exec wc -l "{}" \; | sort -n |
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
static BOOL isRunningTests(void) { | |
NSDictionary *environment = [[NSProcessInfo processInfo] environment]; | |
NSString *injectBundle = environment[@"XCInjectBundle"]; | |
return [[injectBundle pathExtension] isEqualToString:@"octest"]; | |
} |
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
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
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
require 'plist' | |
# xcode 6.2 A16FF353-8441-459E-A50C-B071F53F51B7 | |
plugins_path = File.expand_path('~') + "/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/" | |
Dir.foreach(plugins_path) do |fname| | |
if fname != '.' && fname != '..' && fname != '.DS_Store' | |
plist_path = plugins_path + fname.to_s + '/Contents/Info.plist' | |
if File.exist?(plist_path) | |
application_plist = Plist::parse_xml(plist_path) | |
current_uuids = application_plist['DVTPlugInCompatibilityUUIDs'] |
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
# This is not a ready-to-run script. It just shows the relevant command-line calls. | |
XC_WORKSPACE=path/to/MyApp.xcworkspace | |
XC_SCHEME=MyApp | |
XC_CONFIG=Release | |
ARCHIVE_PATH=dest/path/to/MyApp.xcarchive | |
EXPORT_PATH=dest/path/to/MyApp.ipa | |
DIST_PROFILE=NameOfDistributionProfile | |
# Build and archive. This can be done by regular developers, using their developer key/profile. |
OlderNewer