Skip to content

Instantly share code, notes, and snippets.

View cem2ran's full-sized avatar
⚛️
~ The only constant is change ~

Cem Turan cem2ran

⚛️
~ The only constant is change ~
View GitHub Profile
@cem2ran
cem2ran / reason-0-60.re
Last active April 16, 2020 09:54 — forked from davidkpiano/ts-0-60.ts
TypeScript from 0 to 60
// No TypeScript, but statically typed
let add = (a, b) => a + b;
@cem2ran
cem2ran / RxFirebase.java
Last active August 29, 2015 14:25 — forked from gsoltis/RxFirebase.java
RxJava Bindings for Firebase
package com.firebase.client;
import com.firebase.client.core.view.Event;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
import rx.functions.Func1;
import rx.subscriptions.Subscriptions;
@cem2ran
cem2ran / README.md
Last active August 29, 2015 14:23 — forked from vjpr/README.md

Reduce boilerplate in Redux

  • Create actions similar to Flummox.
  • Generate action ids.
  • Supports actions with promises, and therefore ES7 async.
const combine = (...arrays)
=> [].concat(...arrays);
const compact = arr
=> arr.filter(el => el);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
)();