Skip to content

Instantly share code, notes, and snippets.

View Przemyslaw-Wosko's full-sized avatar

Przemysław Wośko Przemyslaw-Wosko

View GitHub Profile
@Przemyslaw-Wosko
Przemyslaw-Wosko / preprocessor_fun.h
Created July 14, 2019 20:38 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@Przemyslaw-Wosko
Przemyslaw-Wosko / CodableExtensions.swift
Created May 2, 2019 09:18
Handy extension for Codable + transformers
import Foundation
protocol TransformerType {
associatedtype Object
associatedtype JSON
func transformFromJSON(_ value: Any) throws -> Object
func transformToJSON(_ value: Object) throws -> JSON
}
protocol CustomComparator {
associatedtype CustomType
static func compare(_ lhs: CustomType, _ rhs: CustomType) -> Bool
}
protocol InternalTypeProtocol {
associatedtype CustomType: CustomComparator
var property: CustomType? { get set }
}
@Przemyslaw-Wosko
Przemyslaw-Wosko / AppDelegate.swift
Created March 11, 2017 22:01
Swinject with storyboard usage
import Swinject
import SwinjectStoryboard
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let container = Container()
var assembler : Assembler?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
@Przemyslaw-Wosko
Przemyslaw-Wosko / Bug report fastlane
Created December 5, 2016 13:21
Bug report fastlane
```
Build settings for action build and target Test:
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = przemyslawwosko
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = NO