(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import React, { Component } from 'react'; | |
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
import { provide, connect } from 'react-redux'; | |
import thunk from 'redux-thunk'; | |
const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
// ------------ | |
// reducers | |
// ------------ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(function () { | |
MyApp.AlertView = Backbone.View.extend({ | |
tagName: "div", | |
className: "alert fade", | |
template: ["<a href=\"#\" data-dismiss=\"alert\" class=\"close\">×</a>", "<strong>{{ title }}</strong>", "{{ message }}"].join("\n"), |
$ rspec --format MacVimFormatter --color spec |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user |
"--------------------------------------------------------------------------- | |
" Shougo's .vimrc | |
"--------------------------------------------------------------------------- | |
" Initialize:"{{{ | |
" | |
" Enable no Vi compatible commands. | |
set nocompatible | |
let s:is_windows = has('win32') || has('win64') |
if($('.bootswatcher')[0]){ | |
$('.bootswatcher').remove(); | |
} else { | |
var $e = $('<select class="bootswatcher"><option>Amelia</option><option>Cerulean</option><option>Cosmo</option><option>Cyborg</option><option>Journal</option><option>Readable</option><option>Simplex</option><option>Slate</option><option>Spacelab</option><option>Spruce</option><option>Superhero</option><option>United</option></select>'); | |
var l = 1 + Math.floor(Math.random() * $e.children().length); | |
var r = '<link rel="stylesheet" href="http://bootswatch.com/default/bootstrap-responsive.min.css">'; | |
$e.css({'z-index': '99999', 'position': 'fixed', 'top': '5px', 'right': '5px', 'opacity': '0.5'} | |
).hover( | |
function(){$(this).css('opacity', '1');}, | |
function(){$(this).css('opacity', '0.5');} |
" removing trailing spaces before saving | |
autocmd FileType c,cpp,java,php,coffee,javascript,ruby,python,yaml,sh autocmd BufWritePre <buffer> :%s/\s\+$//e |
# default.custom.yaml | |
# 全局範圍識別輸入串爲 rime + 任意數字序列,以及形如 rimeime-1.2.3 的常用西文短語 | |
# 也可將本組 patch 寫入 <輸入方案ID>.custom.yaml 使這組規則僅在一款輸入方案中有效 | |
# | |
# 第一例,輸入 rime 之後,再輸入任意一個數字,則立即識別爲西文輸入 | |
# 再加上 default.yaml 原有的 email 規則,識別包含 @ 字符的郵箱,於是可以一氣呵成 rime123@company.com | |
# 第二例,輸入到 rimeime 時,立即識別爲西文輸入,並可跟隨任意位數字及指定的符號 | |
patch: | |
recognizer/patterns/rime123: "^rime[0-9]+$" |