psql的使用
最小化安装
brew install libpq
ln -s /usr/local/Cellar/libpq/xxxxxx/bin/psql /usr/local/bin/psql
psql -h 172.0.0.1 -p 5432 -U postgres -d public
brew install libpq
ln -s /usr/local/Cellar/libpq/xxxxxx/bin/psql /usr/local/bin/psql
psql -h 172.0.0.1 -p 5432 -U postgres -d public
#查看CPU信息(型号)
[root@ecsnode-no ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
16 Intel Core Processor (Skylake)
# 查看物理CPU个数
[root@ecsnode-no ~]# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
1
# 查看每个物理CPU中core的个数(即核数)
[root@ecsnode-no ~]# cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 8
# 查看逻辑CPU的个数
[root@ecsnode-no ~]# cat /proc/cpuinfo | grep "processor" | wc -l
16
# 替换当前行首个
:s/redis/zookeeper/
# 替换当前行全部
:s/redis/zookeeper/g
# 替换全局
:%s/redis/zookeeper/g
系统开机时按住如下组合键
Command(⌘)+ R:安装Mac之前安装的最新macOS,而不升级到更高的版本。
Option + Command + R:升级到与Mac兼容的最新macOS。
Shift + Option + Command + R:安装Mac原本出厂搭载的macOS,或是最接近且依然可用的版本。
git log --pretty=format:"%Cgreen%s%Creset %Cblue%cn:%Creset %C(yellow)%cd%Creset " --graph -20 --no-merges --date=relative
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
git log --pretty=format:"%s" --graph -1 -b develop
git log --pretty=format:"%s" --graph -10 --no-merges
%H: commit hash
%h: 缩短的commit hash
%T: tree hash
%t: 缩短的 tree hash
%P: parent hashes
%p: 缩短的 parent hashes
%an: 作者名字
%aN: mailmap的作者名字 (.mailmap对应,详情参照git-shortlog(1)或者git-blame(1))
%ae: 作者邮箱
%aE: 作者邮箱 (.mailmap对应,详情参照git-shortlog(1)或者git-blame(1))
%ad: 日期 (--date= 制定的格式)
%aD: 日期, RFC2822格式
%ar: 日期, 相对格式(1 day ago)
%at: 日期, UNIX timestamp
%ai: 日期, ISO 8601 格式
%cn: 提交者名字
%cN: 提交者名字 (.mailmap对应,详情参照git-shortlog(1)或者git-blame(1))
%ce: 提交者 email
%cE: 提交者 email (.mailmap对应,详情参照git-shortlog(1)或者git-blame(1))
%cd: 提交日期 (--date= 制定的格式)
%cD: 提交日期, RFC2822格式
%cr: 提交日期, 相对格式(1 day ago)
%ct: 提交日期, UNIX timestamp
%ci: 提交日期, ISO 8601 格式
%d: ref名称
%e: encoding
%s: commit信息标题
%f: sanitized subject line, suitable for a filename
%b: commit信息内容
%N: commit notes
%gD: reflog selector, e.g., refs/stash@{1}
%gd: shortened reflog selector, e.g., stash@{1}
%gs: reflog subject
%Cred: 切换到红色
%Cgreen: 切换到绿色
%Cblue: 切换到蓝色
%Creset: 重设颜色
%C(...): 制定颜色, as described in color.branch.* config option
%m: left, right or boundary mark
%n: 换行
%%: a raw %
%x00: print a byte from a hex code
%w([[,[,]]]): switch line wrapping, like the -w option of git-shortlog(1).