Skip to content

Instantly share code, notes, and snippets.

Infinite coffee break.

Tadeas Kriz TadeasKriz

Infinite coffee break.
View GitHub Profile

Simply add the following line after the view has been instantiated and set to .inputView. (It might be added elsewhere, but has to be run before the picker is shown)

UIPickerView.appearanceWhenContainedInInstancesOfClasses([UIView.self]).backgroundColor = UIColor.clearColor()

This line combined with textInput.keyboardAppearance = .Dark and returing attributed titles from UIPickerViewDelegate's implementation that have white font will give you a dark UIPickerView which is nice if you have other UITextFields with dark keyboard.

TadeasKriz / UIPickerView-privateAPIs.swift
Last active Dec 15, 2017
UIPickerView workaround for white background being set automatically when used as inputView of UITextField with keyboardAppearance set to .Dark.
View UIPickerView-privateAPIs.swift
class UIPickerViewWorkaround: UIPickerView {
override func respondsToSelector(aSelector: Selector) -> Bool {
if aSelector.description == "_appearanceContainer" {
return false
} else {
return super.respondsToSelector(aSelector)
TadeasKriz /
Created Feb 16, 2016 — forked from piscisaureus/
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

TadeasKriz / preprocessor_fun.h
Created Dec 28, 2015 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
View preprocessor_fun.h
// 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,
* Copyright (C) 2014 Chris Banes
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
View gist:10268749
public class AndroidDronePointFilter implements DronePointFilter {
public boolean accept(DroneContext context, DronePoint<?> dronePoint) {
DronePointContext<?> dronePointContext = context.get(dronePoint);
if (dronePointContext.hasConfiguration() && dronePoint.conformsTo(WebDriver.class)) {
if (dronePointContext.isInstantiated()) {
return dronePointContext.getInstanceAs(WebDriver.class) instanceof AndroidDriver;
} else {
View AGResponse.m
@protocol AGResponse <NSObject>
// Array of unmarshaled objects
@property (readonly, nonatomic) NSArray* objects;
@property (readonly, nonatomic) BOOL hasPrevious;
@property (readonly, nonatomic) BOOL hasNext;
-(void)next:(void (^)(id<AGResponse> response))success failure:(void (^)(NSError *error))failure;
-(void)previous:(void (^)(id<AGResponse> response))success failure:(void (^)(NSError *error))failure;
View only the important
PhaseScriptExecution Run\ Script /Users/tkriz/Library/Developer/Xcode/DerivedData/AeroGear-iOS-Integration-fdyvxhzldclvmifwuslqfdvlaggp/Build/Intermediates/
cd /Users/tkriz/Developer/Sandbox/code-coverage-ios/aerogear-ios-integration/AeroGear-iOS-Integration
/bin/sh -c /Users/tkriz/Library/Developer/Xcode/DerivedData/AeroGear-iOS-Integration-fdyvxhzldclvmifwuslqfdvlaggp/Build/Intermediates/
/Applications/ error: RunUnitTests is obsolete. To run unit tests for your target, use the Test scheme action in the Xcode IDE and the test action in xcodebuild.
/Applications/ note: You can remove the Run Script build phase that invokes RunUnitTests from your unit test
TadeasKriz / log
Created Oct 3, 2013
Failing aerogear-ios-integration
View log
2013-10-03 14:49:46.694 otest[43065:303] Unknown Device Type. Using UIUserInterfaceIdiomPhone based on screen size
Test Suite '/Users/tkriz/Library/Developer/Xcode/DerivedData/AeroGear-iOS-Integration-fdyvxhzldclvmifwuslqfdvlaggp/Build/Products/Debug-iphonesimulator/AeroGear-iOS-IntegrationTests.octest(Tests)' started at 2013-10-03 12:49:46 +0000
Test Suite 'AGAbstractBaseTestClass' started at 2013-10-03 12:49:46 +0000
Test Suite 'AGAbstractBaseTestClass' finished at 2013-10-03 12:49:46 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'AGHttpAuthenticationTests' started at 2013-10-03 12:49:46 +0000
Test Case '-[AGHttpAuthenticationTests testLoginSuccess]' started.
Test Case '-[AGHttpAuthenticationTests testLoginSuccess]' passed (0.616 seconds).
Test Case '-[AGHttpAuthenticationTests test_LoginFails]' started.
Test Case '-[AGHttpAuthenticationTests test_LoginFails]' passed (0.693 seconds).
TadeasKriz / gist:6452308
Last active Dec 22, 2015
Aerogear Push Perf Test iOS
View gist:6452308
"url" : "",
"variantID" : "2eb46b6a-e5f0-497b-861f-d790ca752f09",
"secret" : "1dd0260c-d483-41ad-8d2b-d49f1e58d608",
"alias" : " - iOS"