This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://www.apache.org/dist/openoffice/KEYS | |
gpg --import KEYS | |
gpg --verify <installation_file>.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 使用mysqldump 指令備份資料庫,會產生一長串重建資料庫所需的SQL指令... | |
# ( 站長使用 MySQL 5 ) | |
# 產生的指令前面的SET會先存下目前的字集設定,然後將字集改成Unicode(UTF8) <-- 這個方便的是 若要轉移到其他資料庫的話 比較不需要為字集煩惱 | |
# -- 備份某個資料庫 | |
mysqldump -u root -p db_name > backup.sql; | |
# -- 備份資料庫中的某個資料表 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#============================ | |
#Create bare git repo for deployment | |
#============================ | |
mkdir -p ~/repo/application_stage.git && cd ~/repo/application_stage.git | |
git --bare init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo update-alternatives --config java | |
sudo update-alternatives --config javac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install from package.json | |
npm install | |
#for vagrant | |
#npm install --no-bin-links | |
#install package | |
npm install --save <package_name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Paging | |
gem "kaminari" | |
#mobile Push notification | |
gem 'rpush' | |
#Image upload | |
gem "rmagick" | |
gem "carrierwave" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To solve the InsecurePlatformWarning | |
#========================================== | |
#for ubuntu | |
sudo apt-get install libffi-dev libssl-dev | |
pip install pyopenssl ndg-httpsclient pyasn1 |
NewerOlder