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
{ | |
"aps": { | |
"alert": { | |
"title": "Intercom Push", | |
"body": "Deep Link test" | |
}, | |
"sound":"default" | |
}, | |
"instance_id":"1", | |
"intercom_push_type":"push_only", |
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 RPi.GPIO as GPIO | |
import sys | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
flow_rate_map = dict([(1, 50), (2, 100), (3, 150), (4, 200), (5, 250)]) | |
control_pins = [15,13,11,12] | |
# Load the current flow rate from the local db.txt file | |
db = open("db.txt","r") | |
current_flow_rate = int(db.read().rstrip('\n')) |
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 willFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
[Shine setDeveloperKey:@"<Your-Dev-Key>"]; | |
return YES; | |
} |
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
header=$SRCROOT/NamespacedDependencies.h | |
prefix="SIGMAPOINT" | |
echo "Generating $header from $CODESIGNING_FOLDER_PATH..." | |
echo "// Namespaced Header | |
#ifndef __NS_SYMBOL | |
// We need to have multiple levels of macros here so that __NAMESPACE_PREFIX_ is | |
// properly replaced by the time we concatenate the namespace prefix. |
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
- (void)saveTempContext:(NSManagedObjectContext *)context { | |
NSError *error; | |
[context save:&error]; | |
if (!error) { | |
[self saveMainContext]; | |
} | |
} | |
- (void)saveMainContext { | |
[self.mainManagedObjectContext performBlock:^{ |
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
- (NSManagedObjectContext *)masterManagedObjectContext { | |
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; | |
if (coordinator != nil) { | |
_masterManagedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; | |
[_masterManagedObjectContext setPersistentStoreCoordinator:coordinator]; | |
} | |
return _masterManagedObjectContext; | |
} |
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
+ (NSManagedObjectContext *)temporaryWorkerContext { | |
NSManagedObjectContext *tempMOContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; | |
tempMOContext.parentContext = _mainManagedObjectContext; | |
return tempMOContext; | |
} |
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
- (NSManagedObjectContext *)mainManagedObjectContext { | |
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; | |
if (coordinator != nil) { | |
_mainManagedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; | |
[_mainManagedObjectContext setPersistentStoreCoordinator:coordinator]; | |
} | |
return _mainManagedObjectContext; | |
} |