Skip to content

Instantly share code, notes, and snippets.

View matouka-suzuki's full-sized avatar

matouka-suzuki matouka-suzuki

View GitHub Profile
@mindlapse
mindlapse / guide.md
Last active September 7, 2021 15:05
A guide on how to use PaymentIntents with tipsi-stripe

Introduction

Card payments with Stripe should be performed with PaymentIntents.

This API was created to handle modern payments, where the cardholder's bank may require the user to authenticate themselves with the bank before a payment can be authorized.

Authentication requirements first started to appear with European banks regulated by PSD2 which introduced [Strong Customer Authentication

@romanroibu
romanroibu / Cache.swift
Last active May 14, 2018 03:36 — forked from raulriera/Cacher.swift
Code sample for Medium article about Caching and Protocols
//This is basically a description of the cache along with the type
public struct Cache<T> {
let fileName: String
let transform: (T) throws -> Data
let reverse: (Data) throws -> T
}
extension Cache {
//You can define a "convenience" initializer that takes a fileName,
//and provides PList serialization as transform and reverse transform operations
@Coderian
Coderian / MyPlayground.playground
Last active May 31, 2016 08:33
Swift 2.1 で 構造体の名前とか変数名を取得する ref: http://qiita.com/gi0_0iv/items/dc22e5c177bc5fbeaafa
struct ProgrammingLangage {
var name: String
var version: Int
var revision: Int
var vender: String
}
extension ProgrammingLangage {
var customDescription: String {
get {
@Jerrot
Jerrot / ArrayTransform.swift
Last active March 17, 2024 13:10
Transform arrays with ObjectMapper to Realm's List type
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1
// Author: Timo Wälisch <[email protected]>
import UIKit
import RealmSwift
import ObjectMapper
import SwiftyJSON
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType {
typealias Object = List<T>
@naokits
naokits / ipa_generator.swift
Last active August 29, 2015 14:08
XcodeプロジェクトをビルドしてIPAファイルを生成するだけのSwiftスクリプト?
#!/usr/bin/swift
//
// ipa_generator.swift
//
// Created by Naoki Tsutsui on 2014/10/29.
// Copyright (c) 2014年 Naoki Tsutsui All rights reserved.
//
/*