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 | |
| import PluggableApplicationDelegate | |
| @UIApplicationMain | |
| class AppDelegate: PluggableApplicationDelegate { | |
| override var services: [ApplicationService] { | |
| return [ | |
| LoggerApplicationService() | |
| ] |
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 | |
| import PluggableApplicationDelegate | |
| @UIApplicationMain | |
| class AppDelegate: PluggableApplicationDelegate { | |
| override var services: [ApplicationService] { | |
| return [ | |
| PushNotificationsService(), | |
| AnalyticsService(), |
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
| pragma solidity ^0.4.4; | |
| import "./ValueStorage.sol"; | |
| contract StorageAccessor { | |
| ValueStorage public valueStorage; | |
| function StorageAccessor(address _valueStorageAddress) public { | |
| valueStorage = ValueStorage(_valueStorageAddress); |
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
| const pipe = (...fs) => fs.reduce((f, g) => (x) => g(f(x))); | |
| const mul3 = x => x * 3; | |
| const sum2 = x => x + 2; | |
| pipe(sum2, mul3, mul3)(1); // (1 + 2) * 3 * 3 === 27 |
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
| // Pipes for promise - based flows | |
| // https://medium.com/@dtipson/more-functional-javascript-reducing-promises-ramda-js-arrow-functions-again-c1f90e0a79d0 | |
| const program = (...list) => acc => list.reduce( (acc,fn) => acc.then(fn), Promise.resolve(acc)); |
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
| // From here https://agostini.tech/2017/07/30/understanding-operation-and-operationqueue-in-swift/ | |
| class BaseOperation: Operation { | |
| private var _executing = false { | |
| willSet { | |
| willChangeValue(forKey: "isExecuting") | |
| } | |
| didSet { | |
| didChangeValue(forKey: "isExecuting") | |
| } |
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 React, { Component } from 'react'; | |
| const { log } = console; | |
| export default (prefix) => (WrappedComponent) => { | |
| const message = text => `[${prefix}] ${text}`; | |
| return class EnhancedComponent extends WrappedComponent { | |
| render() { |
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
| // | |
| // Konex.swift | |
| // Konex | |
| // | |
| // Created by Fernando Ortiz on 24/5/18. | |
| // Copyright © 2018 Fernando Ortiz. All rights reserved. | |
| // | |
| import Foundation |
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
| public struct RequestData { | |
| public let path: String | |
| public let method: HTTPMethod | |
| public let params: [String: Any?]? | |
| public let headers: [String: String]? | |
| public init ( | |
| path: String, | |
| method: HTTPMethod = .get, | |
| params: [String: Any?]? = nil, |
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
| struct User: Codable { | |
| let id: Int | |
| let username: String | |
| } |