zookeeper 与 kafka 集群设置教程, 作为教程, 下文描述的步骤是在 1台 服务器上部署 启动三个 zookeeper 和 kafka 服务以组成模拟集群, 多机上的注意事项会在相关位置说明
FIXME
的均为在实际环境中需要注意的值(比如 ip, 端口, 文件路径), 其余值新增内容均为固定值
mkdir -p /data/kafka-cluster-test/{kafka,zookeeper}-data-{1,2,3}
#!/bin/sh | |
set -e | |
is_wsl() { | |
case "$(uname -r)" in | |
*microsoft* ) true ;; # WSL 2 | |
*Microsoft* ) true ;; # WSL 1 | |
* ) false;; | |
esac | |
} |
#!/bin/bash | |
# install docker (with aliyun yum repo) | |
sudo yum remove docker \ | |
docker-client \ | |
docker-client-latest \ | |
docker-common \ | |
docker-latest \ | |
docker-latest-logrotate \ | |
docker-logrotate \ |
target_encoding = "utf-16" | |
text = ''' | |
# coding: utf-16 | |
print("你好,世界") | |
''' | |
with open("/tmp/utf-16", "w", encoding="utf-16") as f: | |
f.write(text) |
""" | |
Varint encoder/decoder | |
varints are a common encoding for variable length integer data, used in | |
libraries such as sqlite, protobuf, v8, and more. | |
Here's a quick and dirty module to help avoid reimplementing the same thing | |
over and over again. | |
For both python 2 and 3 | |
""" |
zookeeper 与 kafka 集群设置教程, 作为教程, 下文描述的步骤是在 1台 服务器上部署 启动三个 zookeeper 和 kafka 服务以组成模拟集群, 多机上的注意事项会在相关位置说明
FIXME
的均为在实际环境中需要注意的值(比如 ip, 端口, 文件路径), 其余值新增内容均为固定值
mkdir -p /data/kafka-cluster-test/{kafka,zookeeper}-data-{1,2,3}
I hereby claim:
To claim this, I am signing this object:
on run {} | |
tell application "OmniFocus" | |
tell content of first document window of front document | |
set validSelectedItemsList to value of (selected trees where class of its value is not item and class of its value is not folder) | |
-- 未选择 | |
if (count of validSelectedItemsList) is 0 then | |
display alert "未选择任何项" message "请选择一个或多个动作/项目后重试" as critical | |
return | |
end if |
-- | |
-- based on a script originally file downloaded from: | |
-- http://c-command.com/scripts/omnifocus/defer-to-tomorrow | |
-- | |
-- ======================================== | |
-- Script to defer Omnifocus task to | |
-- random date in the future (emulation of "defer to random date" from iOS version | |
-- ======================================== | |
-- It chooses a random number of days ranging from 14 to 90 days and adds to today's date | |
-- NB: That's the same values Omnifocus uses in their iOS version |
on run {} | |
set ADD_DAYS to 1 | |
set PERIOD_TIMES to 1 | |
set _time to 0 | |
set _date to current date | |
repeat with _action in my selectedActions() | |
if _time mod PERIOD_TIMES is equal to 0 then | |
set _date to calculateDate(_date, ADD_DAYS) |
on run {} | |
set i to 1 | |
repeat with _action in my selectedActions() | |
my processAction(_action, i) | |
set i to i + 1 | |
end repeat | |
tell application "OmniFocus" | |
tell default document | |
compact | |
end tell |