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
// by https://github.com/zz85 | |
// http://en.wikipedia.org/wiki/Werckmeister_temperament | |
// Werckmeister I (III): "correct temperament" based on 1/4 comma divisions | |
var werckmeister = [ | |
1, // c | |
256/243, // c# | |
64 / 81 * Math.pow(2, 1/2), // d | |
32/27, // d# |
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 Foundation | |
import GameController | |
private let epsilonMotion = 1.0 | |
private func near(a: Double, _ b: Double) -> Bool { | |
return abs(a - b) < epsilonMotion | |
} | |
private let minimumNotableAcceleration = 1.0 |
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
#!/bin/sh | |
info_plist="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
spot_environment=$(echo "$GCC_PREPROCESSOR_DEFINITIONS" | sed -n 's/^.*ENVIRONMENT=\(.\)/\1/p') | |
facebook_url="fb0000000000${spot_environment}" | |
current_facebook_url=$(/usr/libexec/PlistBuddy -c "Print CFBundleURLTypes:0:CFBundleURLSchemes:0" "$info_plist") |
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
// | |
// UIAlertViewCrashFix.h | |
// | |
// Created by Josh Hudnall on 4/28/15. | |
// | |
// | |
#import <Foundation/Foundation.h> | |
@interface UIAlertController (CrashFix) |
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
// | |
// ABLLinkManager.swift | |
// | |
// Created by Cem Olcay on 5.03.2018. | |
// Copyright © 2018 cemolcay. All rights reserved. | |
// | |
import Foundation | |
import AVFoundation |
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
// | |
// FMInfoPanelViewController.h | |
// Created by Florian Mielke (@FlorianMielke) on 06.12.11. | |
// | |
#import <UIKit/UIKit.h> | |
#import <Foundation/Foundation.h> | |
#import <QuartzCore/QuartzCore.h> | |
@interface FMInfoPanelViewController : UIViewController <UIScrollViewDelegate> |
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
#!/usr/bin/env ruby | |
device_types_output = `xcrun simctl list devicetypes` | |
device_types = device_types_output.scan /(.*) \((.*)\)/ | |
runtimes_output = `xcrun simctl list runtimes` | |
runtimes = runtimes_output.scan /(.*) \(.*\) \((com.apple[^)]+)\)$/ | |
devices_output = `xcrun simctl list devices` | |
devices = devices_output.scan /\s\s\s\s(.*) \(([^)]+)\) (.*)/ |
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
extension UIView { | |
func add3DFloatingEffect(withDepth depth: Double = 1 / 12, duration: Double = 5) { | |
let depthAngle = depth * .pi | |
let rotationAnimationY = CABasicAnimation(keyPath: "transform.rotation.y") | |
rotationAnimationY.fromValue = NSNumber(floatLiteral: -1 * depthAngle) | |
rotationAnimationY.toValue = NSNumber(floatLiteral: depthAngle) | |
rotationAnimationY.duration = duration | |
rotationAnimationY.repeatCount = Float(Int.max) | |
rotationAnimationY.autoreverses = true | |
rotationAnimationY.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) |
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 Foundation | |
import UIKit | |
@propertyWrapper | |
class Tappable<T: UIView>: NSObject, UIGestureRecognizerDelegate { | |
// MARK: - Public Properties | |
public var wrappedValue: T? { | |
willSet { | |
removeGesture() |
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 SwiftUI | |
struct NewStopView: View { | |
let stop: Model.Stop | |
var body: some View { | |
Text("New Layout").font(.title) | |
RouteLayout(spacing: 8) { | |
ForEach(stop.routes ?? []) { route in | |
RouteView(route: route) |
OlderNewer