Browse Source

switch to hugo

xinxin 4 years ago
parent
commit
18b007606b

+ 5 - 0
config.toml

@@ -0,0 +1,5 @@
+baseURL = "http://example.org/"
+languageCode = "en-us"
+title = "My New Hugo Site"
+theme = "HugoTheme-VibrantShadows"
+

+ 11 - 0
content/posts/bm25.md

@@ -0,0 +1,11 @@
+---
+title: "Bm25"
+date: 2021-06-08T17:17:09+07:00
+draft: true
+---
+
+### TODO
+
+[BM25 in details](https://codingnote.cc/zh-tw/p/9017/)
+
+[BM25 on wikipedia](https://en.wikipedia.org/wiki/Okapi_BM25)

+ 13 - 0
content/posts/daily-mysql.md

@@ -0,0 +1,13 @@
+---
+title: "Mysql Commands"
+date: 2021-06-08T17:45:30+07:00
+draft: false
+tags: []
+---
+
+### 
+
+```json
+mysql> DESCRIBE business.student;
+mysql> show create table business.student;
+```

+ 11 - 0
content/posts/daily-nginx.md

@@ -0,0 +1,11 @@
+---
+title: "Daily Nginx"
+date: 2021-06-08T17:19:16+07:00
+draft: true
+---
+
+### TODO
+
+[location 配置](https://github.com/oufeng/Blog/issues/1)
+
+[route to different backend by path](https://gist.github.com/soheilhy/8b94347ff8336d971ad0)

+ 13 - 0
content/posts/daily-postgre.md

@@ -0,0 +1,13 @@
+---
+title: "Daily Postgre"
+date: 2021-06-08T17:20:57+07:00
+draft: true
+---
+
+### TODO
+
+[postgres basics](http://www.ruanyifeng.com/blog/2013/12/getting_started_with_postgresql.html)
+
+[postgre in details](http://tw.gitbook.net/postgresql/index.html)
+
+[streaming replication](https://blog.yasking.org/a/postgresql-12-streaming-replication.html)

+ 18 - 0
content/posts/env.md

@@ -0,0 +1,18 @@
+---
+title: "环境变量配置"
+date: 2021-06-08T15:45:30+07:00
+draft: false
+tags: []
+---
+
+### golang 环境设置
+
+```shell
+# uncompress tarball
+$tar xzf go-x.tar.gz
+# add path to environment
+$sudo vi /etc/profile
+export PATH=$PATH:/location/to/golang
+# test it
+$go version
+```

+ 100 - 0
content/posts/git-in-real-world.md

@@ -0,0 +1,100 @@
+---
+title: "Git in Real World"
+date: 2021-06-08T15:45:30+07:00
+draft: false
+tags: []
+---
+
+### 拉取所有远程 tags
+
+```shell
+$git fetch --all --tags
+```
+
+### 基于某个 tag 新建 branch
+
+```shell
+$git checkout tags/<tag_name> -b <new_branch_name>
+```
+
+### Ignore ^M as a newline when execute 'git diff'
+
+```shell
+$git config --global core.autocrlf true
+```
+
+### 查看指定文件修改历史
+
+```shell
+$git log --pretty=oneline [--oneline] <filename>
+```
+
+### 查看单次提交详情
+
+```shell
+$git show <commit>
+```
+
+### 撤销 git add 
+
+```shell
+$git reset HEAD 
+$git reset HEAD <filename>
+$git reset HEAD <path>
+$git rm --cached <filename>
+```
+
+### 撤销 commit (尚未 push)
+
+```shell
+$git reset --soft HEAD^
+
+# 如果撤销 2 次 commit
+$git reset --soft HEAD~2
+
+# 其他参数
+--mixed 为默认参数,不删除工作空间代码改动,撤销 commit,并撤销 add
+# $git reset --mixed HEAD~2 == $git reset HEAD~2
+--soft 不删除工作空间代码改动,撤销 commit, 不撤销 add
+--hard 删除工作空间代码改动,撤销 commit,撤销 add
+```
+
+### 删除若干 commit
+
+[参见](https://www.clock.co.uk/insight/deleting-a-git-commit)
+
+### rebase 远程分支
+
+假设情景如下: 有一些本地分支,其中 master 是用来同步的主分支
+对应自己有一个远程仓库 origin, origin 是 clone 自另一个仓库
+假设地址在 https://github.com/a/b.git. 现在需要拉取原始仓库的更新
+
+```shell
+$git remote add upstream https://github.com/a/b.git
+$git fetch upstream
+$git checkout master
+$git rebase upstream/master
+$git push -f origin master
+```
+
+### remove untracked files
+
+```shell
+$git clean -d -n # dry run
+$git clean -d -f # remove untracked files
+$git clean -d -i # interactive mode
+$git clean -d -f <folder> # remove untracked files in folder
+$git clean -d -f -x # ignore files included.
+```
+
+### CONFILICTS when merge and resolving
+
+```shell
+# cancel the merge
+$git reset --hard HEAD
+# merge by theirs
+$git pull --strategy=theirs <remote>
+or
+$git checkout <branchA>
+$git merge -X theirs <branchB>
+```

+ 11 - 0
content/posts/github-projects.md

@@ -0,0 +1,11 @@
+---
+title: "Github Projects"
+date: 2021-06-08T17:22:54+07:00
+draft: true
+---
+
+### 未分类
+
+.. _Sonic: https://github.com/valeriansaliou/sonic
+.. _wukongd: https://github.com/vanderw/wukongd
+.. _hummingbot: https://github.com/CoinAlpha/hummingbot