Skip to content

Instantly share code, notes, and snippets.

bundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" Tyche-Info.plist)
buildNumber=$(/usr/libexec/PlistBuddy -c "Print DDBuildNumber" Tyche-Info.plist)
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :DDBuildNumber $buildNumber" Tyche-Info.plist
/usr/local/git/bin/git add .
/usr/local/git/bin/git commit -m "Version $bundleVersion.$buildNumber"
#define BLOCK(name, return, ...) return(^name)(__VA_ARGS__)
#define BLOCKTYPE(return, ...) return(^)(__VA_ARGS__)
// Example Usage:
// To declare a block inside a function/method:
//
// BLOCK(foo, int, BOOL) = ^(BOOL bar) { return bar ? 4 : 3; }
//
// NSLog(@"%d", foo(NO)); // "3"
int i = 0;
for(NSString* key in keys)
{
//do stuff here with key and i
i++;
}
#import "Common.h"
@interface AnimatedFloat : NSObject
{
float _startValue;
NSTimeInterval _startTime;
BOOL _hasStarted;
float _endValue;
NSTimeInterval _endTime;
#ifndef TINY_PROFILER
#define TINY_PROFILER 1
// Tiny Profiler is a lightweight tool for tracking and logging multiple tasks. I use it to
// see which parts of my OpenGL scene graph take the longest to render.
//
// Because logging is relatively expensive, the TinyProfilerLog() function only logs every
// nth time it is called, where n is TINY_PROFILER_LOG_INTERVAL. Set this to 1 to log every time.
//
// TINY_PROFILER_COUNT is the maximum number of active profilers. There is no bounds-checking,