Skip to content

Instantly share code, notes, and snippets.

@googya
googya / Redux-React-Counter-Example
Created July 19, 2017 06:46 — forked from rjmacarthy/Redux-React-Counter-Example
Redux and React Simple JSBIN
https://jsbin.com/debohu/1/edit?html,js,output
@googya
googya / gist:d8af34d9fd5f71e5d95b63aeed7aba7b
Created July 13, 2017 07:24 — forked from mxpv/gist:5262043
Git caret and tilde
http://paulboxley.com/blog/2011/06/git-caret-and-tilde
http://alblue.bandlem.com/2011/05/git-tip-of-week-git-revisions.html
@googya
googya / validation.js
Last active June 21, 2017 22:32
spected 和 ramda 验证表单
const R = require('ramda')
const {
compose,
curry,
head,
isEmpty,
length,
not,
prop,
is,
@googya
googya / web-servers.md
Created May 16, 2017 06:32 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@googya
googya / common_algorithms.hs
Last active April 26, 2017 06:50
common algorithms in haskell
-- 将一个元素插入 list 的方式个数
insert::a -> [a] -> [[a]]
insert n [] = [[n]]
insert n (n':ns) = (n:n':ns):[n':ns'| ns' <- insert n ns]
-- 排列的意思就是, 将一个元素插入到所有其他 n-1 个元素的排列中
permutation::[a] -> [[a]]
permutation [] = [[]]
permutation (n:ns) = concat [ insert n ns' | ns' <- permutation n ns ]
@googya
googya / FP.js
Created April 14, 2017 02:32
functional javascript utils
const compose = (f, g) => (x) => f(g(x))
@googya
googya / introrx.md
Created April 6, 2017 14:23 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@googya
googya / RxJS 5 Operators By Example.md
Created April 6, 2017 14:08 — forked from lyyourc/RxJS 5 Operators By Example.md
「译」RxJS 5 Operators By Example
@googya
googya / RxJS 5 Operators By Example.md
Created April 6, 2017 14:08 — forked from lyyourc/RxJS 5 Operators By Example.md
「译」RxJS 5 Operators By Example
@googya
googya / SimpleObservable.js
Created March 21, 2017 03:38
使用 setter/getter 实现 observable
function Seer(dataObj) {
let signals = {};
observeData(dataObj);
return {
data: dataObj,
observe,
notify
}