Skip to content

Instantly share code, notes, and snippets.

View roc-wong's full-sized avatar

roc-wong roc-wong

  • 蚂蚁金服
View GitHub Profile
@roc-wong
roc-wong / shell_study.sh
Created May 10, 2018 05:40
shell 命令学习
dir_name='2018-02-11'
# 声明数组
declare -a date_array
# awk引用shell变量要使用'""',但是split函数也需要""来界定,并且这个""不能被shell解释, 只能被awk解释,所以使用\"
eval $(awk 'BEGIN{split('"\"$dir_name\""', a, "-"); for(i in a) print "date_array["i"]="a[i]}')
for i in ${date_array[*]}; do
echo "$i"
<type>(<scope>): <subject>
<body>
<footer>
# -- Type --
# Must be one of the following:
#
# feat: A new feature
@roc-wong
roc-wong / ConfirmDontLoseMessages.java
Created April 13, 2018 02:35 — forked from scvalex/ConfirmDontLoseMessages.java
Don't lose messages with RabbitMQ Publisher Acknowledgements
// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
// License for the specific language governing rights and limitations
// under the License.
//