Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
import { render } from 'react-dom';
import Hello from './Hello';
import { createStore,applyMiddleware } from 'redux';
import { Provider, connect} from 'react-redux';
import createSagaMiddleware from 'redux-saga'
import { call, put, takeEvery, takeLatest } from 'redux-saga/effects'
//////////////////////////////
Concept:
A buffer is the in-memory text of a file.
A window is a viewport on a buffer.
A tab page is a collection of windows.
#cursor movement
w,e,b -> word movement
% -> go to matching parentheses ({[
[{, ]} -> go to ({[
*,# -> next/previous occurence of the word under cursor
@kittolau
kittolau / gpg
Created November 2, 2015 16:05
gpg integrity check
wget http://www.apache.org/dist/openoffice/KEYS
gpg --import KEYS
gpg --verify <installation_file>.asc
@kittolau
kittolau / backup
Created October 26, 2015 10:24
mysql command cheat sheet
# 使用mysqldump 指令備份資料庫,會產生一長串重建資料庫所需的SQL指令...
# ( 站長使用 MySQL 5 )
# 產生的指令前面的SET會先存下目前的字集設定,然後將字集改成Unicode(UTF8) <-- 這個方便的是 若要轉移到其他資料庫的話 比較不需要為字集煩惱
# -- 備份某個資料庫
mysqldump -u root -p db_name > backup.sql;
# -- 備份資料庫中的某個資料表
@kittolau
kittolau / git_bare_init.sh
Last active February 24, 2016 04:32
git cheat sheet
#!/bin/sh
#============================
#Create bare git repo for deployment
#============================
mkdir -p ~/repo/application_stage.git && cd ~/repo/application_stage.git
git --bare init
@kittolau
kittolau / selenium_server.sh
Last active November 6, 2015 17:15
System V init script template, the work from https://github.com/jasonblewis/sample-service-script
#!/bin/sh
SERVICE_RUNAS=selenium
SERVICE_NAME=selenium_server
#add system user to run selenium
sudo useradd -r $SERVICE_RUNAS
sudo mkdir /home/selenium
sudo chown selenium:selenium /home/selenium
#service params
@kittolau
kittolau / java.sh
Created October 19, 2015 05:10
managing java version
sudo update-alternatives --config java
sudo update-alternatives --config javac
@kittolau
kittolau / npm_cheat_sheet
Last active October 16, 2015 09:32
nvm related stuff
#install from package.json
npm install
#for vagrant
#npm install --no-bin-links
#install package
npm install --save <package_name>
@kittolau
kittolau / gem
Created October 4, 2015 09:58
Rails Resource
#Paging
gem "kaminari"
#mobile Push notification
gem 'rpush'
#Image upload
gem "rmagick"
gem "carrierwave"
@kittolau
kittolau / InsecurePlatformWarning
Last active October 2, 2015 17:30
virtualenv cheat sheet
#To solve the InsecurePlatformWarning
#==========================================
#for ubuntu
sudo apt-get install libffi-dev libssl-dev
pip install pyopenssl ndg-httpsclient pyasn1