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
{ | |
"data": { | |
"allAirports": [ | |
{ | |
"name": "Sealand Helipad", | |
"latitude": 51.894444, | |
"iataCode": "", | |
"identifier": "ZZ-0001", | |
"isoCountry": "GB", | |
"__typename": "Airport", |
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
{ | |
"query": "query AllAirports { allAirports { __typename airportId identifier airportType name elevation isoCountry isoRegion municipality gpsCode iataCode localCode homepageURL wikipediaURL scheduledService latitude longitude }}" | |
} |
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
query AllAirports { | |
allAirports { | |
airportId, | |
identifier, | |
airportType, | |
name, | |
elevation, | |
isoCountry, | |
isoRegion, | |
municipality, |
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
self.persistentContainer = [NSPersistentContainer persistentContainerWithName:@"Model"]; | |
[self.persistentContainer loadPersistentStoresWithCompletionHandler: | |
^(NSPersistentStoreDescription* description, NSError* error) { | |
NSLog(@"%@ %@", description, error); | |
}]; |
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)searchFor:(NSString*)query | |
{ | |
// Cancel any existing search queries | |
if (self.searchQuery) | |
{ | |
[self.searchQuery cancel]; | |
self.searchQuery = nil; | |
[self.searchResults removeAllObjects]; | |
[self updateSearchResults]; | |
} |
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)indexAirportData | |
{ | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ | |
for (ALAirport* airport in self.airports) | |
{ | |
// Create the attribute set | |
CSSearchableItemAttributeSet* attributeSet = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:(NSString*)kUTTypeItem]; | |
attributeSet.displayName = airport.airportName; | |
attributeSet.latitude = @(airport.coordinate.latitude); |
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
{ | |
"this": "succeeded", | |
"by": "dweeting", | |
"the": "dweet", | |
"with": { | |
"thing": "{thing_name}", | |
"created": "2014-01-15T17:28:42.556Z", | |
"content": { | |
"hello": "world", | |
"foo": "bar" |
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
on alfred_script(q) | |
tell application "Mail" | |
activate | |
-- Accounts | |
set AnL to account "A&L" | |
set GMail to account "GMail" | |
set FastMail to account "FastMail" | |
-- Personal Email |
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
# Remove 64-bit build architecture from Pods targets | |
# http://cameronspickert.com/2014/01/20/remove-the-arm64-architecture-from-cocoapods-targets.html | |
post_install do |installer| | |
installer.project.targets.each do |target| | |
target.build_configurations.each do |configuration| | |
target.build_settings(configuration.name)['ARCHS'] = '$(ARCHS_STANDARD_32_BIT)' | |
end | |
end | |
end |
NewerOlder