Skip to content

Instantly share code, notes, and snippets.

View mikkoj's full-sized avatar
🎾
Writing code in Piikkiö, Finland.

Mikko Junnila mikkoj

🎾
Writing code in Piikkiö, Finland.
View GitHub Profile
@mikkoj
mikkoj / HealthKitService.swift
Created January 23, 2020 08:35
HealthKitService
import UIKit
import HealthKit
class HealthKitService: NSObject {
private let healthStore = HKHealthStore()
static let instance = HealthKitService()
private enum HealthKitControllerError: Error {
case DeviceNotSupported
public enum AccountStatus
{
NotRegistered = 1,
SimpleCustomer = 2,
ValuableCustomer = 3,
MostValuableCustomer = 4
}
public class DiscountManager
{
@mikkoj
mikkoj / appState.js
Last active January 14, 2017 16:50
BatMobile AppState
class AppState {
@observable batteries = []
@observable loadingBatteries = false
@observable selectedChargeStatusViewType = ChargeStatusViewType.Percent
@observable selectedBattery = null
}
class Battery {
id = null
### Keybase proof
I hereby claim:
* I am mikkoj on github.
* I am mikkoj (https://keybase.io/mikkoj) on keybase.
* I have a public key whose fingerprint is CDD7 09FF 7891 E6FC B3ED 9D14 8660 760B B68E B966
To claim this, I am signing this object: