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 | |
# Adapted from http://stackoverflow.com/questions/24039470/xcode-6-ios-creating-a-cocoa-touch-framework-architectures-issues/26691080#26691080 | |
# and https://gist.github.com/cromandini/1a9c4aeab27ca84f5d79 | |
# Create a new aggregate target. | |
# For the automatically generated scheme, change its build config to "release". | |
# Ensure this target's "product name" build setting matches the framework's. | |
# Add a run script with `source "${PROJECT_DIR}/path_to_this_script` |
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
import Foundation | |
import CoreLocation | |
import os | |
class BeaconService: NSObject { | |
static let shared = BeaconService() | |
private var locationManager: CLLocationManager = CLLocationManager() | |
var callback: ((_ beacons: [CLBeacon])->())? | |
private var requestLocationAuthorizationCallback: ((CLAuthorizationStatus) -> Void)? | |
override init() { |
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
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
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
import Foundation | |
import SystemConfiguration | |
class Reachability | |
{ | |
var hostname: String? | |
var isRunning = false | |
var isReachableOnWWAN: Bool | |
var reachability: SCNetworkReachability? | |
var reachabilityFlags = SCNetworkReachabilityFlags() |
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
import UIKit | |
extension UIViewController | |
{ | |
class func instantiateFromStoryboard(_ name: String = "Main") -> Self | |
{ | |
return instantiateFromStoryboardHelper(name) | |
} | |