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 <MapKit/MapKit.h> | |
@interface DPAnnotationView : MKAnnotationView | |
@property (nonatomic, assign) MKMapView *mapView; | |
@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
import UIKit | |
// How to make singleton classes in Swift: http://stackoverflow.com/questions/24024549/dispatch-once-singleton-model-in-swift | |
// Basically using global constants is the most easy and safe way to go | |
class APIClient: NSObject { | |
let functionSessionManager:AFHTTPSessionManager | |
class var sharedInstance:APIClient { |
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
// | |
// Results+Rx.swift | |
// | |
// Make Realm auto-updating Results observable. Works with Realm 0.98 and later, RxSwift 2.1.0 and later. | |
// | |
// Created by Florent Pillet on 12/02/16. | |
// Copyright (c) 2016 Florent Pillet. All rights reserved. | |
// | |
import Foundation |
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
const MY_DOMAIN = "agodrich.com" | |
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2" | |
const DISQUS_SHORTNAME = "agodrich" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { | |
"Access-Control-Allow-Origin": "*", |
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
#include <Wire.h> | |
void setup() { | |
Serial.begin(115200); // Start serial communication at 115200 baud rate | |
while (!Serial); // Wait for serial port to connect | |
Serial.println("\nI2C Scanner"); | |
Wire.begin(); // Initialize I2C communication | |
} | |
void loop() { |