This file contains hidden or 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>coop.plausible.backupd-daily</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper</string> | |
</array> |
This file contains hidden or 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 NSObject (AMAssociatedObjects) | |
- (void)associateValue:(id)value withKey:(void *)key; // Retains value. | |
- (id)associatedValueForKey:(void *)key; | |
@end |
This file contains hidden or 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
[[RKObjectManager sharedManager] postObject:contact delegate:self block:^(RKObjectLoader* loader) { | |
RKObjectMapping* serializationMapping = [[[RKObjectManager sharedManager] mappingProvider] serializationMappingForClass:[Contact class]]; | |
NSError* error = nil; | |
NSDictionary* dictionary = [[RKObjectSerializer serializerWithObject:contact mapping:serializationMapping] serializedObject:&error]; | |
RKParams* params = [RKParams paramsWithDictionary:dictionary]; | |
[params setData:[contact avatarImageData] MIMEType:@"image/png" forParam:@"avatar_image"]; | |
loader.params = params; | |
}]; |
This file contains hidden or 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)viewDidLoad { | |
[super viewDidLoad]; | |
// Configure RestKit Logging | |
RKLogConfigureByName("RestKit/UI", RKLogLevelTrace); | |
RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace); | |
RKLogConfigureByName("RestKit/Network*", RKLogLevelDebug); | |
// Configure the object manager | |
RKObjectManager* manager = [RKObjectManager objectManagerWithBaseURL:@"http://localhost:4567/"]; |
This file contains hidden or 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
/* | |
File: KeychainItemWrapper.h | |
Abstract: | |
Objective-C wrapper for accessing a single keychain item. | |
Version: 1.2 - ARCified | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
Inc. ("Apple") in consideration of your agreement to the following | |
terms, and your use, installation, modification or redistribution of |
This file contains hidden or 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
/** Open States API - Data for all state legislatures (well, 38 states so far) | |
* API documentation, method listing, and example GISTs at: | |
* http://openstates.sunlightlabs.com/api/ | |
* | |
* Base URL = http://openstates.sunlightlabs.com/api/v1 | |
* NOTE: All GET requests to this base URL must include an 'apikey' query parameter. | |
* | |
* My API key looks like this "/districts/tx?apikey=350284d0c6af453b9b56f6c1c7fea1f9" | |
* | |
* Resource Path Examples: |
This file contains hidden or 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 would be inserted somewhere in your app-wide tableviewcontroller superclass configuration, to reap the benefits across all subsequent tables. | |
self.tableController.heightForHeaderInSection = 22; | |
self.tableController.onViewForHeaderInSection = ^UIView*(NSUInteger sectionIndex, NSString* sectionTitle) { | |
UIView* headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.bounds.size.width, 22)] autorelease]; | |
headerView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"sectionheader_bg.png"]]; | |
UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, self.tableView.bounds.size.width, 22)]; | |
label.text = sectionTitle; | |
label.textColor = [UIColor whiteColor]; | |
label.backgroundColor = [UIColor clearColor]; | |
label.font = [UIFont boldSystemFontOfSize:12]; |
This file contains hidden or 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
UIWebView *webView = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
webView.delegate = self; | |
webView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin; | |
NSURL *htmlPath = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"about" ofType:@"html"]isDirectory:NO]; | |
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0); | |
dispatch_async(queue, ^{ | |
This file contains hidden or 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
// | |
// MNDocumentController.h | |
// MindNodeTouch | |
// | |
// Created by Markus Müller on 22.12.08. | |
// Copyright 2008 Markus Müller. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@class MNDocumentReference; |
This file contains hidden or 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 DrawInsetBeveledRoundedRect( CGContextRef context, CGRect rect, CGFloat radius, UIColor *fillColor ) | |
{ | |
//contract the bounds of the rectangle in to account for the stroke | |
CGRect drawRect = CGRectInset(rect, 1.0f, 1.0f); | |
//contract the height by 1 to account for the white bevel at the bottom | |
drawRect.size.height -= 1.0f; | |
//Save the current state so we don't persist anything beyond this operation | |
CGContextSaveGState(context); |
OlderNewer