Skip to content

Instantly share code, notes, and snippets.

View mehmetdelikaya's full-sized avatar
💻

Mehmet Delikaya mehmetdelikaya

💻
  • London
View GitHub Profile
@broady
broady / 1MarkerAnimation.java
Last active March 13, 2024 12:44
Animating Markers
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@DanielStormApps
DanielStormApps / EmailValidator.swift
Last active March 16, 2021 14:22 — forked from darthpelo/EmailValidator.swift
This regular expression is adapted from a version at regular-expressions.info and is a complete verification of RFC 2822. Source: http://www.cocoawithlove.com/2009/06/verifying-that-string-is-email-address.html. Dedicate article: https://medium.com/@darthpelo/email-validation-in-swift-3-0-acfebe4d879a
extension String {
/// Checks if the `String` is a valid email address.
/// ````
/// // Example
/// "name@email.com".isValidEmailAddress() // true
/// "name(at)email(dot)com".isValidEmailAddress() // false
/// "name@email".isValidEmailAddress() // false
/// "name@.com".isValidEmailAddress() // false
/// "name.com".isValidEmailAddress() // false
@evansobkowicz
evansobkowicz / EmbedsViewController.swift
Last active September 2, 2023 18:01
EmbedsViewController Example Code
//
// EmbedsViewController.swift
//
// Created by Evan Sobkowicz.
// Copyright © 2019 Twitter. All rights reserved.
//
import UIKit
import WebKit
import SafariServices
struct DependencyInjector {
private static var dependencyList: [String:Any] = [:]
static func resolve<T>() -> T {
guard let t = dependencyList[String(describing: T.self)] as? T else {
fatalError("No povider registered for type \(T.self)")
}
return t
}