ECMAScript

遮蔽(遮盖、屏蔽),可见(作用域、可见域);生存期。

Octopress

Start Command Prompt with Ruby

1
2
3
# DevKit
ruby dk.rb init
ruby dk.rb install
1
2
3
4
cd Octopress
ruby --version # Should report Ruby 1.9.3
gem install bundler
bundle install
1
gem install rubypython # not necessary for Octopress now
1
2
3
4
cd Octopress
rake new_post["title"]
rake preview # http://localhost:4000/
rake deploy
1
2
3
4
cd Octopress
bundle exec rake new_post["title"]
bundle exec rake preview
bundle exec rake deploy

Git Bash

1
2
$ pbcopy < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard
1
git clone git@github.com:seii-saintway/seii-saintway.github.io.git Octopress
1
2
cd Octopress
git checkout -b source origin/source
1
2
cd Octopress
git checkout source
1
2
3
4
cd Octopress
git add .
git commit -m 'your message'
git push origin source

Windows Command Prompt

Add the “cmd” directory of “git” to System Environment Variable “Path”.

Add the “bin” directory of “Ruby” to System Environment Variable “Path”.

Add the “Python” directory to System Environment Variable “Path”.

My “rake setup_github_pages” with “git init”

1
2
3
4
5
6
7
8
9
cd Octopress
git init
git remote add origin git@github.com:seii-saintway/seii-saintway.github.io.git
git checkout -b source

cd _deploy
git init
git remote add origin git@github.com:seii-saintway/seii-saintway.github.io.git
cd ..
1
2
3
cd Octopress
rake generate
rake deploy
1
2
3
4
cd Octopress
git add .
git commit -m "Fresh Start!"
git push origin source

NPM

1
2
npm --registry "http://npm.hacknodejs.com/" install underscore 
npm --registry "http://registry.npmjs.vitecho.com/" install underscore

npm install

macOS

command + shift + G

Hexo

1
2
3
cd hexo
npm install --save
node_modules/hexo/bin/hexo server --debug
1
2
3
4
5
# https://hexo.io/
npm install hexo-cli --save
npm install hexo --save
npm install hexo-server --save
npm install hexo-deployer-git --save
1
2
3
hexo s
hexo g
hexo d
1
2
3
hexo clean
# Clean the cache file (db.json) and generated files (public).
# 在某些情况(尤其是更换主题后),如果发现您对站点的更改无论如何也不生效,您可能需要运行该命令。

vi

1
2
gg
G

ESLint

1
npm install -g eslint

Continuous Integration

git submodule

1
2
git rm --cached -r themes/freemind
git submodule add https://github.com/seii-saintway/hexo-theme-freemind.git themes/freemind
1
git submodule update --init

git update-index

1
2
git update-index --assume-unchanged .idea/workspace.xml
git update-index --no-assume-unchanged .idea/workspace.xml

encoding

1
git config --global core.quotepath false

Comments

2015-09-03