Upgrade Hexo to 7.0.0
vim package.json modify hexo version from 6.3.0 to 7.0.0 close files. run npm update then test, hexo clean hexo g hexo s hexo d
Git rebase
如果你正在 feature 分支上合作开发,并且你追踪的是上游的 feature 分支,当你要提 pr 时,发现落后 master 分支若干次提交, 那么,你可以这样: 12345678910111213141516171819# 之前 feature ==> upstream/feature# step 1git branch -u upstream/dev# 这时,在终端你可以看到 feature 分支落后 master 若干次提交;# step 2git pull -r# 如果没有冲突,你可以看到已经和 master 分支对齐了# 如果有冲突,可以解冲突、add、git rebase --continue 继续,直至全部对齐为止# step 3# 推到上游即可git push upstream -f # step 4# 再切回追踪的 feature 为上游git branch -u upstream/feature
CMake CPP
目录结构 12345CMakeLists.txt/src/include/lib/build 其中 CMakeLists.txt 内容如下: 123456789101112131415161718# CMake 最低版本号要求cmake_minimum_required (VERSION 2.8)# C++ 11 支持:qset(CMAKE_CXX_FLAGS "-std=c++11")# 项目信息project (my_demos)# 设置源码位置set(SRC ${PROJECT_SOURCE_DIR}/src/carrots.cpp)# 生成可执行文件的位置set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)# 指定生成目标add_executable(${PROJECT_NAME} ${SRC}) cd 到 build 目录下,生成 Makefile: 1cd build && cmake .. &...
Debug with LLDB
First, compile codes with DSYM: 1g++ -g test.cpp -o test then, launch with LLDB Debugger: 1lldb test print codes: 1list(l) numbers set breakpoint: 1breakpoint set --file test.cpp --line 13 enable breakpoint: 1breakpoint enable 1 run program: 1run debug step-in: 1n continue to end: 1c
tar command
macOS 压缩gtar –exclude=.git –exclude=.gitignore –exclude=.DS_Store –exclude=build –exclude=.vscode –exclude=.gitattributes -czvf my_codes.tar.gz ./my_codes general linux 下压缩tar -czvf ./backup.tar.gz ./current_folder linux 下解压缩tar -xzvf ./backup.tar.gz –no-same-owner
2022-upgrade-my-blog-to-6.3.0-hexo
Recently I update my blog from 4.0.0 to 6.3.0 hexo.
How to read the book and write down note
俗话说,好记性,不如烂笔头。 当开始阅读时,第一次不定能理解所有内容,这时,笔记的作用就来了,笔记可以帮助你整理思路,日后再看书时,可以更进一步地理解之前没有理解了的内容。 笔记的另一个好处是,可以帮助学习者建立起费曼学习法的过程。 一个新知识,只有用浅显地语言再讲出来时,才能说明学习者真正地理解了。
VIM survival manuals
Cmd Meaning I insert mode; Esc command mode; o append mode; :shell temp enter shell; Ctrl+z temp enter shell(v2); fg return back to vim; shift + > insert tab; /word search word; n search next; b,w jump word; gg, G jump start, end; 10g go to 10 line; Ctrl + d,u page down, up; v visual mode; y yank(copy); dd cut; p paste; :vsp vertical split tab; :sp horizontal slpit tab; Ctrl + w change focus window; Ctrl + n nerd tree :q! quick not save;...
Xcode_some_directories
1/Library/Developer/CoreSimulator/Profiles/Runtimes 1~/Library/Developer/CoreSimulator/Devices 1~/Library/Caches/com.apple.dt.Xcode/Downloads
upgrade hexo to 4.0.0
Recently I update my blog from 1.0.0 to 4.0.0 hexo.













