Gerrit:Commit Message Length Configuration

Commit Message Length Configuration

This plugin checks the length of a commit’s commit message subject and message body, and reports warnings or errors to the git client if the lengths are exceeded.

The maximum lengths of the subject and message body can be configured in the standard Gerrit config file gerrit.config.

commitmessage.maxSubjectLength : Maximum length of the commit message’s subject line. If not specified, defaults to 65.

commitmessage.maxLineLength : Maximum length of a line in the commit message’s body. If not specified, defaults to 70.

commitmessage.rejectTooLong : If set to true, reject commits whose subject or line length exceeds the maximum allowed length. If not specified, defaults to false.

Gerrit 迁移

Gerrit迁移后,首次访问会出现“拒绝访问”错误,解决方案如下:

  • 清除index目录下的索引文件
  • 重建索引 java -jar /home/gerrit2/gerrit_site/bin/gerrit.war reindex

Shell 判断系统类型

case “$OSTYPE” in
linux*)
echo “Set Envs for linux”
;;
darwin*)
echo “Set Envs for Mac”
;;
*)
echo “Unsupported OS, Exit”
exit 100
;;
esac

Android Gradle SDK License Agreements

* What went wrong:
A problem occurred configuring project ':mi'.
> Failed to notify project evaluation listener.
   > You have not accepted the license agreements of the following SDK components:
     [Android SDK Build-Tools 25].
     Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
     Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
   > You have not accepted the license agreements of the following SDK components:
     [Android SDK Build-Tools 25].
     Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
     Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

解决方案: android update sdk -u在过程中选择同意[y]

Docker 常用命令

列出所有镜像


docker images
docker images --format "{{.ID}}: {{.Repository}}"
docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}"

删除 Dangling 镜像

docker rmi $(docker images -q -f dangling=true)

进入容器

docker exec -it name bash

Docker Commit

docker commit \--author "name" \--message "message" \webserver \nginx:v2sha256:000000000.....

以root用户进入Container

docker exec -u root -it [container_id] bash

挂载卷

docker run -d -v hostdata:/containerdata xxxx

端口映射

docker run -p [host port]:[container port] xxx

更新Docker存储大小

此方法会清除所有现有镜像,需要做好镜像备份

qemu-img create -f qcow2 ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 100G

以TAR包方式导入导出镜像

docker save -o ~/image_save.tar image
docker load -i ~/image_save.tar

上传到Docker Store

docker logindocker tag [image id] username/imagename:versiondocker push username/imagename

非root用户使用Docker

sudo usermod -aG docker $USER