- Zingermans - amazing sandwiches
- Lunch room - gourmet caferia food [smallish portions]
- Afternoon Delight - not gourmet cafeteria food [close]
- Mark's Carts - outdoor food carts [smallish portions]
- Blue tractor - BBQ
- Jersusalem Garden - falafel [cheap] [close]
- Marnee Thai - thai
I hereby claim:
- I am hungtruong on github.
- I am hungtruong (https://keybase.io/hungtruong) on keybase.
- I have a public key whose fingerprint is B1E1 7231 0901 3663 BD98 B7E6 CCF6 5E15 5446 A2B5
To claim this, I am signing this object:
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
@-moz-document domain("google.com") { | |
div.sQR2Rb { | |
display: none !important; | |
} | |
} |
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
/// Prevents the user from swiping up to dismiss the app. | |
override func preferredScreenEdgesDeferringSystemGestures() -> UIRectEdge { | |
return UIRectEdge.bottom | |
} |
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
// Hides the home indicator on the inactive and passcode entry view | |
override func prefersHomeIndicatorAutoHidden() -> Bool { | |
switch passcodeViewMode { | |
case .inactive, .passcodeEntry: | |
return true | |
default: | |
return false | |
} | |
} |
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 method will start a timer to either "wake" the device or put it to sleep if it is in the right orientation. | |
/// On a timer because the real device seems to delay it by a bit. | |
func handleDeviceMotion(motion: CMDeviceMotion) { | |
// device is tilted up | |
if motion.attitude.pitch > 0.5 { | |
if tiltActionTimer == nil { | |
tiltActionTimer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: false, block: { (_) in | |
if self.passcodeViewMode == .inactive { | |
self.setPasscodeViewMode(.lockedScreen) | |
} |
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
enum WorkoutSegment { | |
case warmup(duration: TimeInterval, powerLow: Double, powerHigh: Double) | |
case intervals(reps: Int, onDuration: TimeInterval, offDuration: TimeInterval, onPower: Double, | |
offPower: Double) | |
case steady(duration: TimeInterval, power: Double) | |
case cooldown(duration: TimeInterval, powerLow: Double, powerHigh: Double) | |
} |
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
func wattage(for ftp: Int, interval: TimeInterval) -> Int { | |
switch self { | |
case .warmup(duration: let duration, powerLow: let powerLow, powerHigh: let powerHigh): | |
return Int((((interval / duration) * (powerHigh - powerLow)) + powerLow) * Double(ftp)) | |
case .steady(duration: _, power: let power): | |
return Int(power * Double(ftp)) | |
case .intervals(reps: _, onDuration: _, offDuration: _, onPower: _, offPower: _): | |
return 0 | |
case .cooldown(duration: let duration, powerLow: let powerLow, powerHigh: let powerHigh): | |
return Int(((((duration - interval) / duration) * (powerHigh - powerLow)) + powerLow) * Double(ftp)) |
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.workoutSession = session | |
self.workoutBuilder = workoutSession.associatedWorkoutBuilder() | |
self.workoutBuilder.dataSource = | |
HKLiveWorkoutDataSource(healthStore: healthStore, | |
workoutConfiguration: workoutConfiguration) | |
self.workoutSession.delegate = self | |
self.workoutBuilder.delegate = self | |
self.workoutBuilder.beginCollection(withStart: Date()) { (_, _) in } | |
session.startActivity(with: Date()) |
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
func workoutBuilder(_ workoutBuilder: HKLiveWorkoutBuilder, didCollectDataOf collectedTypes: Set<HKSampleType>) { | |
for type in collectedTypes { | |
guard let quantityType = type as? HKQuantityType else { | |
return | |
} | |
switch quantityType { | |
case HKQuantityType.quantityType(forIdentifier: .heartRate): | |
guard let statistics = workoutBuilder.statistics(for: quantityType), | |
let value = statistics.mostRecentQuantity()?.doubleValue(for: heartRateUnit) |
OlderNewer