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
| NSArray *bkLat = @[ | |
| @(40.720852), | |
| @(40.721852), | |
| @(40.722852), | |
| @(40.723852), | |
| @(40.724852), | |
| @(40.725852), | |
| @(40.726852), | |
| @(40.727852), | |
| @(40.728852), |
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
| NSArray *mLats = @[ | |
| @(40.73308), | |
| @(40.73408), | |
| @(40.73508), | |
| @(40.73608), | |
| @(40.73708), | |
| @(40.73808), | |
| @(40.73908), | |
| @(40.74008), | |
| @(40.74108), |
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
| var onHeadingUpdateListener: ((heading: CLHeading) -> Void)? | |
| onHeadingUpdateListener = { (heading: CLHeading) -> Void in | |
| print(heading) | |
| } |
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
| #!/bin/bash | |
| if [ ! $2 ]; then | |
| echo "$ ./github.sh *repository_name* ./username.txt" | |
| exit 0 | |
| fi | |
| rootpath=~/Desktop/repos/$1; | |
| if [ ! -d ${rootpath} ] | |
| then |
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]; | |
| _peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self queue:nil]; | |
| [_peripheralManager startAdvertising:@{ CBAdvertisementDataServiceUUIDsKey : @[[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID]] }]; | |
| } |
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
| func doTheThing(num: Int) -> Int { | |
| guard num != 1 else {return 1} | |
| let diff = [0, -1, 1][num % 3] | |
| print("\(num), \(diff)") | |
| return doTheThing((num + diff) / 3) | |
| } |
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
| // | |
| // ViewController.swift | |
| // FacebookTest | |
| // | |
| // Created by Michael Kavouras on 10/31/15. | |
| // Copyright © 2015 Michael Kavouras. All rights reserved. | |
| // | |
| import UIKit | |
| import ParseFacebookUtilsV4 |
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
| // | |
| // AppDelegate.swift | |
| // FacebookTest | |
| // | |
| // Created by Michael Kavouras on 10/31/15. | |
| // Copyright © 2015 Michael Kavouras. All rights reserved. | |
| // | |
| import UIKit | |
| import CoreData |
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
| AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; | |
| [manager GET:@"http://example.com/resources.json" parameters:nil success:^(NSURLSessionTask *task, id responseObject) { | |
| NSLog(@"JSON: %@", responseObject); | |
| } failure:^(NSURLSessionTask *operation, NSError *error) { | |
| NSLog(@"Error: %@", error); | |
| }]; |
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
| NSDate *date = [NSDate dateWithTimeIntervalSinceReferenceDate:time]; | |
| NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
| [dateFormatter setDateFormat:@"EEEE"]; | |
| NSString *dateName = [dateFormatter stringFromDate:date]; |