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
#!/bin/bash | |
cd $PROJECT_DIR | |
BUILD_VERSION=`/usr/local/bin/git rev-parse --short HEAD` | |
cd "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app" | |
RELEASE_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Info.plist) | |
/usr/libexec/PlistBuddy -c "Set CFBundleVersion $BUILD_VERSION" Info.plist | |
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:1:DefaultValue $RELEASE_VERSION ($BUILD_VERSION)" Settings.bundle/Root.plist |
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
.DS_Store | |
*.swp | |
*~.nib | |
build/ | |
*.pbxuser | |
*.perspective | |
*.perspectivev3 |
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
// | |
// RBNetworkActivityIndicatorManager.h | |
// | |
// Copyright (c) 2011 Robert Brown | |
// | |
// 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 |
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> | |
// clang -fobjc-arc -Wall -Wformat -Weverything -Wno-format-nonliteral -framework Foundation -o log log.m | |
// Compiler likes explicit function prototypes prior to first use. | |
// Add an attribute to get additional checking from the compiler | |
extern void QuietLog (NSString *format, ...) __attribute__((format(__NSString__, 1, 2))); | |
// !!! The attribute above isn't warning like it should, but NSLog's _is_ working. | |
// This is NSLog's attribute. I'm currently baffled. |
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
// | |
// SGDeviceIdentifier.h | |
// Elements | |
// | |
// Created by Justin Williams on 9/28/12. | |
// Copyright (c) 2012 Second Gear. 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
#import <Foundation/Foundation.h> | |
#import <mach/mach_time.h> // for mach_absolute_time() and friends | |
// clang -g -fobjc-arc -Weverything -Wno-unused-parameter -framework Foundation -o iteration iteration.m | |
// Run this by passing arguments on the command line. Run without any | |
// arguments to see the supported flags. Each time a flag is used causes | |
// that test to be run and timed, with the time (in seconds) output when | |
// it finishes. Be careful not to do anything else on your machine (such | |
// as surfing Redding while getting bored looking at the terminal) otherwise |
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
@interface NSFileManager (DoNotBackup) | |
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL; | |
@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
------------ | |
Conformances | |
------------ | |
protocol AbsoluteValuable | |
Conformances: | |
Comparable | |
IntegerLiteralConvertible | |
SignedNumberType |
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
CGRect CGRectIntegralScaledEx(CGRect rect, CGFloat scale) | |
{ | |
return CGRectMake(floorf(rect.origin.x * scale) / scale, floorf(rect.origin.y * scale) / scale, ceilf(rect.size.width * scale) / scale, ceilf(rect.size.height * scale) / scale); | |
} | |
CGRect CGRectIntegralScaled(CGRect rect) | |
{ | |
return CGRectIntegralScaledEx(rect, [[UIScreen mainScreen] scale]); | |
} |
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 CoreGraphics | |
infix operator |> { precedence 50 associativity left } | |
// MARK: CGPoint | |
func +(lhs: CGPoint, rhs: CGPoint) -> CGPoint { | |
return CGPoint(x: lhs.x + rhs.x, y: lhs.y + rhs.y) | |
} |
OlderNewer