Skip to content

Instantly share code, notes, and snippets.

norio-nomura / URLCodableTest.playground
Created Jun 12, 2017 — forked from ken0nek/URLCodableTest.playground
Can not decode an entity which has Optional<URL> property.
View URLCodableTest.playground
//: Playground - noun: a place where people can play
import UIKit
struct URLCodableTest: Codable {
let ou: URL?
let u: URL
enum CodingKeys: String, CodingKey {
case ou
norio-nomura / otpauthFromVIPAccess.exp
Last active Sep 21, 2016 — forked from p120ph37/VIPAccess.exp
Generate otpauth URL from Symantec's "VIP Access" on OS X that can be used by TOTP Apps such as 1Password.
View otpauthFromVIPAccess.exp
#!/usr/bin/expect -f
# otpauthFromVIPAccess.exp
# Generate otpauth scheme url from Symantec VIP Access.
# Usage:
# ./otpauthFromVIPAccess.exp [v]
# If the "v" argument (or any argument) is specified, verbose output
# will be produced on stderr. The otpauth url will be output on stdout.
View Collection+movingAverage.swift
// Collection+movingAverage.swift
// inspired by
import Foundation
public protocol ArithmeticType: Comparable, IntegerLiteralConvertible {
func +(lhs: Self, rhs: Self) -> Self