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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.plex.plexconnect</string> | |
<key>WorkingDirectory</key> | |
<string>/Users/chris/PlexConnect</string> | |
<key>ProgramArguments</key> |
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
// | |
// LocationHelper.m | |
// | |
// Created by Chris Hulbert on 24/04/12. | |
// | |
#import "LocationHelper.h" | |
@interface LocationHelper() | |
@property(copy) LocationBlock locationBlock; |
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
// | |
// LocationHelper.h | |
// | |
// Created by Chris Hulbert on 24/04/12. | |
// | |
#import <Foundation/Foundation.h> | |
#import <CoreLocation/CoreLocation.h> | |
#define locationHelperPurpose @"This app would like to know your location for some good reason." // Change this! |
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
// | |
// Helpers.h | |
// | |
// Created by Chris Hulbert on 17/04/12. | |
// | |
#import <UIKit/UIKit.h> | |
@interface Helpers : NSObject |
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
// | |
// Helpers.m | |
// | |
// Created by Chris Hulbert on 17/04/12. | |
// | |
#import "Helpers.h" | |
@implementation Helpers |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.mycompanyname.mydepartment.mytaskname</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/myuser/Dashboard/mytask.sh</string> | |
</array> |
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
// DictionaryTypesHelper.h | |
#import <Foundation/Foundation.h> | |
@interface NSDictionary (NSDictionary_DictionaryTypesHelper) | |
- (NSArray*)arrayForKey:(id)key; | |
- (NSDictionary*)dictionaryForKey:(id)key; | |
- (NSString*)stringForKey:(id)key; | |
- (NSNumber*)numberForKey:(id)key; | |
- (NSData*)dataForKey:(id)key; |
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
#include <Wire.h> | |
#define DEVICE (0x53) // ADXL345 device address when the SDO pin (12) is grounded | |
void setup() | |
{ | |
Wire.begin(); // join i2c bus (address optional for master) | |
Serial.begin(115200); // start serial for output | |
// Wake up the accelerometer |
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
// Display a progressbar | |
- (void)progress:(int)progress withMessage:(NSString*)message { | |
UIView* v = [[[UIView alloc] init] autorelease]; | |
v.frame = CGRectMake(0, 0, 200, 30); | |
v.backgroundColor = [UIColor clearColor]; | |
UILabel* lbl = [[[UILabel alloc] init] autorelease]; | |
lbl.frame = CGRectMake(0,0, 200, 15); | |
lbl.backgroundColor = [UIColor clearColor]; | |
lbl.textColor = [UIColor whiteColor]; |
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
// Resize the controls | |
- (void)doMyResizing { | |
// Resize some stuff here | |
self.something.frame = something... | |
} | |
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { | |
[self doMyResizing]; | |
} |