月度归档:2019年06月

blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];

FORBIDDEN/12/index read-only / allow delete (api)

官方解决方法:

curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

_all 可以改为自己的索引名称,也可以直接执行

curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

原文链接:https://www.cnblogs.com/zhja/p/9717536.html

Git更安全的强制推送 -force-with-lease

Git 的 push --force 具有破坏性,因为它无条件地覆盖远程存储库,无论你在本地拥有什么。使用这个命令,可能覆盖团队成员在此期间推送的所有更改。然而,有一个更好的办法,当你需要强制推送,但仍需确保不覆盖其他人的工作时,-force-with-lease 这条指令选项可以帮助到你。


作者:LeviDing
链接:https://juejin.im/post/5985b9c56fb9a03c376de762
来源:掘金
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

统计php-fpm内存占用总量

ps auxf|grep www_sockets | grep -v grep | awk ‘{print $6}’ | awk ‘{sum+=$1} END {print “Memory =”, sum/1024/1024, “GB”}’

根据需求定制 红色部分是你要修改的部分

git子模块支持分支

You can set the submodule to track a particular branch (requires git 1.8.2+), which is what we are doing with Komodo, or you can reference a particular repository commit (the later requires updating the main repository whenever you want to pull in new changes from the module – i.e. updating the commit hash reference).

git submodule add -b master https://github.com/Komodo/trackchanges.git src/modules/trackchanges