-
Plug an Ethernet cable into your computer. You'll need this for Internet connectivity while your Wi-Fi card is used to create a network.
-
Enable Internet Sharing in System Preferences.
-
Get your phone connected to the network you just created and make sure you can browse the web.
-
Ensure dummynet'd packets are still routed through the normal rules so masquerading works:
eleos@Nebula ~$ sudo sysctl -w net.inet.ip.fw.one_pass=0 net.inet.ip.fw.one_pass: 0 -> 0
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
phil@Supernova > java -jar lib/swagger-codegen-cli.jar version | |
3.0.0-SNAPSHOT | |
phil@Supernova > java -jar lib/swagger-codegen-cli.jar generate -v -i specs/client/petstore.yaml -l swagger -o output/client/petstore | |
[main] INFO io.swagger.codegen.config.CodegenConfigurator - | |
VERBOSE MODE: ON. Additional debug options are injected | |
- [debugSwagger] prints the swagger specification as interpreted by the codegen | |
- [debugModels] prints models passed to the template engine | |
- [debugOperations] prints operations passed to the template engine | |
- [debugSupportingFiles] prints additional data passed to the template engine | |
[main] INFO io.swagger.parser.Swagger20Parser - reading from specs/client/petstore.yaml |
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
### Keybase proof | |
I hereby claim: | |
* I am pnc on github. | |
* I am pnc (https://keybase.io/pnc) on keybase. | |
* I have a public key whose fingerprint is CAE3 A08A 3CFB 5042 82BD 80B8 37B7 21F0 DAE6 961F | |
To claim this, I am signing this object: |
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
ATVManagedTableSection *inboxSection = [[ATVManagedTableSection alloc] initWithIdentifier:@"inbox"]; | |
[inboxSection setManagedObjectContext:context andFetchRequest:fetchRequest]; | |
[inboxSection registerNib:@"PIMessageCell" forIdentifier:@"PIMessageCell"]; | |
[inboxSection setCellSource:^UITableViewCell *(ATVTableSection *section, NSUInteger index, id object) { | |
UITableViewCell *cell = [section dequeueReusableCellWithIdentifier:@"PIMessageCell"]; | |
return cell; | |
}]; | |
[inboxSection setConfigureCell:^(ATVTableSection *section, UITableViewCell *cell, NSUInteger index, id object) { | |
PIMessageCell *messageCell = (PIMessageCell *)cell; | |
[messageCell setMessage:object]; |
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
*.xcdatamodel) | |
echo "`basename $1 .xcdatamodel`.mom" | |
echo "`basename ${1} .xcdatamodel`.mom" | |
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename ${1} .xcdatamodel`.mom" | |
;; |
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 NSDictionary (Inflector) | |
- (NSDictionary *)underscoredDictionaryWithPrefix:(NSString *)prefix andSuffix:(NSString *)suffix; | |
@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
// © 2011 Phillip N. Calvin | |
// For use in a setter. | |
// Signs up self to receive KVO notifications about given properties | |
// on any new value and removes self as an observer from the old value. | |
// For example, to observe properties of a property called customer | |
// (backed by ivar _customer): | |
// PCPropertyObserver(customer, @"allowSubscriptionPurchase", @"availableProducts"); | |
// You'd need to write this selector yourself: |
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
--- 1.txt 2012-04-06 14:09:33.000000000 -0400 | |
+++ 2.txt 2012-04-06 14:09:45.000000000 -0400 | |
@@ -119,28 +119,35 @@ | |
} | |
//END:progressivelyMigrateURLFindModels | |
//See if we can find a matching destination model | |
//START:progressivelyMigrateURLFindMap | |
NSMappingModel *mappingModel = nil; |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
NSError *error = nil; | |
// Load the data model | |
NSManagedObjectModel *model = [NSManagedObjectModel mergedModelFromBundles:nil]; | |
// Set up the SQLite store | |
NSURL *documentsDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; | |
NSURL *storeURL = [documentsDirectory URLByAppendingPathComponent:@"Example.sqlite"]; |
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
(for own key, value of assignable_attributes | |
attribute_scope = $('#reservation_' + key) | |
attribute_scope.val(value) | |
attribute_scope.change() | |
) | |
(for own key, value of ui.item.attribute_labels | |
$(".reservation-label-#{key}").html(value) | |
) |