Skip to content

Instantly share code, notes, and snippets.

View laiso's full-sized avatar
☀️

laiso laiso

☀️
View GitHub Profile
@laiso
laiso / firestore-batch.js
Created December 14, 2018 06:15
chunk loading
const query = firestore
.collection(`posts`)
.limit(200)
forEachDocs(query, docs => {
docs.map(doc => {
console.log(`${doc.id} do something`)
})
})
@laiso
laiso / mail.txt
Created November 22, 2018 17:52
React Native Developer - The Internet of the Future
---------- Forwarded message ---------
From: Martin Raeburn <[email protected]>
Date: Thu, Nov 22, 2018 at 10:39 PM
Subject: React Native Developer - The Internet of the Future
To: [email protected] <[email protected]>
Dear laiso,
@laiso
laiso / Notification.test.js
Created October 10, 2018 13:36
Jest testing with mock of Cloud Firestore SDK
const admin = require('firebase-admin')
class Notification {
constructor(doc, firestore = admin.firestore()) {
this.doc = doc
this.firestore = firestore
}
notify(toUser) {
const {user} = this.doc.data()
//
// GoogleDocsViewController.swift
// Created by laiso on 2018/06/12.
//
// let gdViewController = GoogleDocsViewController(nibName: nil, bundle: nil)
// gdViewController.url = "https://docs.google.com/document/.../pub"
// let nav = UINavigationController(rootViewController: gdViewController)
// self.present(nav, animated: true, completion: nil)
//
いつもGMOコインをご利用いただき、誠にありがとうございます。
当社では現在、すべてのアルトコインについてスプレッドを縮小するキャンペーンを実施させていただいておりますが、12月上旬以降のアルトコイン価格高騰に伴い、当初2017年12月27日(水) 15:00終了を予定していた本キャンペーンにつきまして、
「2017年12月22日(金) 10:00終了」
とさせていただきます。
※当社のスプレッドは、変動制であり、相場状況等により変動する場合がございます。
お客様には直前のご案内となり、大変ご不便をおかけいたしますが、ご了承いただけますよう何卒お願い申し上げます。
本書への推薦の言葉
エリック・リースによるまえがき
監訳者まえがき
はじめに
謝辞
第Ⅰ部 Lean UXへのイントロダクションと基本原則
1章  かつてないほどに高まるLean UXの重要性
デザインは常に進化している
@laiso
laiso / qiita_unfollow.js
Last active May 17, 2017 02:08
Qiita unfollowスクリプト
// http://qiita.com/:user/following_users を開き1ページづつコンソールで実行
jQuery('.tableList_avatarCell a').map( (i, url) => { return url + '/unfollow' }).map( (i, url) => { jQuery.post(url) })
class ViewController: UIViewController {
@IBOutlet weak var button: UIButton!
private var viewModel: ViewModel!
private let disposeBag = DisposeBag()
override func viewDidLoad() {
super.viewDidLoad()
viewModel = ViewModel(buttonTap: self.button.rx.tap.asObservable())
// ViewModel
completion = myStream.asObservable()
.flatMapLatest {
performOrError()
}
// ViewCOntroller
viewModel.completion.observeOn(MainScheduler.instance)
.retryWhen(showAlert(error:))
.subscribe(onNext: { [weak self] in
@laiso
laiso / Rx+APIHimotoKit.swift
Created April 14, 2017 07:01
RxSwift(RxCocoa)+APIKit+Himotoki
import RxSwift
import RxCocoa
import APIKit
extension Reactive where Base: URLSession {
func response<T: Request>(_ request: T) -> Observable<T.Response> {
var req: URLRequest
do {
req = try request.buildURLRequest()
} catch {