Skip to content

Instantly share code, notes, and snippets.

Tomas Harkema tomasharkema

Block or report user

Report or block tomasharkema

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tomasharkema
tomasharkema / dabblet.css
Created Sep 8, 2014 — forked from anonymous/dabblet.css
Oefening 2.2a - Formulier
View dabblet.css
/**
* Oefening 2.2a - Formulier
*/
View MeteorSwift.swift
protocol Method {
associatedtype ReturnType
static var name: String { get }
var parameters: [AnyObject]? { get }
}
extension METDDPClient {
func callMethod<T : Method>(method: T) -> Promise<T.ReturnType, MeteorError> {
return callMethodWithNamePromise(T.name, parameters: method.parameters)
View keybase.md

Keybase proof

I hereby claim:

  • I am tomasharkema on github.
  • I am tomasharkema (https://keybase.io/tomasharkema) on keybase.
  • I have a public key whose fingerprint is 93E0 F9DD A0D0 7C57 C823 2968 9B8F 53C2 D982 F137

To claim this, I am signing this object:

View resume.swift
//: Resume - noun: a document to secure new employment
import Foundation
enum ExperienceLevel {case experienced;case medior;case adequate;case beginner;case shr¯__¯g;};typealias Experience = (String, String, Date); typealias School = (String, String, String, Int, Date?);typealias CodeExperience = (String, Date, ExperienceLevel);typealias ProudOf = (String, String, URL?);typealias Hobby = (String, URL?);typealias LanguageExperience = (Locale, ExperienceLevel)
let alsoAvailableAt = URL(string: "https://gist.github.com/tomasharkema/2bb70bcf98f92a2972d650ee87436362")
let name = "Tomas Harkema"
let lookingFor = "A graduation project"
View Info.plist
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
View OldAppDelegate.swift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
// ...
window = UIWindow(bounds: UIScreen.main.bounds)
window.rootViewController = PostNLRootViewController()
window.makeKeyAndVisible()
// ...
View NewAppDelegate.swift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
// Moved window creation to the SceneDelegate below
return true
}
// Added this method:
// Here we tell iOS what scene configuration to use
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
connectingSceneSession.userInfo?["activity"] = options.userActivities.first?.activityType
View SceneDelegate.swift
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
window.rootViewController = PostNLRootViewController()
window.makeKeyAndVisible()
}
}
View Info.plist
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
View OpenNewWindow.swift
let activity = NSUserActivity(activityType: shipment.key)
UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity, options: nil, errorHandler: {})
You can’t perform that action at this time.