Skip to content

Instantly share code, notes, and snippets.

View erain's full-sized avatar

Yu YI erain

View GitHub Profile
@erain
erain / iterm2-solarized.md
Created November 13, 2016 06:43 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

@erain
erain / go-lang.el
Last active August 29, 2015 14:03 — forked from samertm/.emacs
;; http://youtu.be/h8bsJV0-2qs
;; get the following packages:
;; go-mode
;; go-eldoc
;; company-mode
;; company-go
;; get the following go programs (run each line in your shell):
;; go get code.google.com/p/go.tools/cmd/goimports
;; go get code.google.com/p/rog-go/exp/cmd/godef
;; go get github.com/nsf/gocode
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

环境 (Environment)

版本:Ubuntu 14.04 LTS 默认语言:English(United States)

安装 (Setup)

Debian 和 Ubuntu 下对中文支持比较好的字体有: fonts-droid、ttf-wqy-zenhei 和 ttf-wqy-microhei 等,除了文泉驿系列字体外,比较流行的免费中文字体还有文鼎提供的楷体和上海宋,包名分别是: fonts-arphic-ukai 和 fonts-arphic-uming。

@erain
erain / gist:3857375
Created October 9, 2012 08:34 — forked from mikeyk/gist:1329319
Testing storage of millions of keys in Redis
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
@erain
erain / script.md
Last active October 6, 2015 01:07 — forked from torgeir/install_redis_on_ubuntu.md
Redis 2.4.8 Install on Ubuntu 10.04

Installation commands:

$ wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz
$ tar xvfz redis-2.6.7.tar.gz 
$ cd redis-2.6.7/
$ sudo mkdir -p /opt/redis
$ sudo make PREFIX=/opt/redis install
$ sudo cp redis.conf /opt/redis/redis.conf
$ cd /opt/redis
@erain
erain / tree.md
Created April 24, 2012 02:15 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!