Daily 9/12

学习

Bash History

修改命令记录数量

export HISTFILESIZE=10000
export HISTSIZE=1000

MAC Terminal TAB

tab切换快捷键 Command + shit + {Command + Shit + ← 向左切换
Command + shit + }Command + Shit + → 向左切换

Gerrit

gerrit query Query the change database gerrit query
gerrit query : Obtain the latest refspec on a Gerrit Change 详细讲解gerrit query
gerrit stream-events 提交事件
gerrit stream-events Provides a portal into the major events occurring on the server, outputting activity data in real-time to the client. Events are filtered by the caller’s access permissions, ensuring the caller only receives events for changes they can view on the web, or in the project repository.

GIT

GIT_SSH_COMMAND

用于git ssh链接访问仓库时,默认设置
GIT_SSH_COMMAND $GIT_SSH_COMMAND takes precedence over $GIT_SSH, and is interpreted by the shell, which allows additional arguments to be included.

GIT_SSH_COMMAND='ssh -i %s' git fetch 

FETCH_HEAD

FETCH_HEAD 指的是: 某个branch在服务器上的最新状态'. 每一个执行过fetch操作的项目’都会存在一个FETCH_HEAD列表, 这个列表保存在 .git/FETCH_HEAD 文件中, 其中每一行对应于远程服务器的一个分支. 当前分支指向的FETCH_HEAD, 就是这个文件第一行对应的那个分支.

Vim

:set wrap "设置自动换行
:set nowrap "设置不自动换行

Python

rfind returns the last index whre the substring is found, or -1 if no such index exists

str.rfind(str, beg=0 end=len(string))

获取当前时间的时间戳

int(time.time())
最后修改 February 7, 2021 : doc: 整理daily日记 (0dcc57d)