运行 在/e/java_workspace/demo mvn spring-boot:run mvn package后 在/e/java_workspace/demo/target java -jar demo-0.0.1-SNAPSHOT.jar 代码 https://github.com/xiaohuasheng/FirstSpringBoot 参考 http://tengj.top/2017/02/26/springboot1/
yum安装pip和fabric
发表于
更新于
yum -y install epel-release yum -y install python-pip pip install --upgrade pip pip install fabric==1.13.1 参考 https://www.cnblogs.com/saolv/p/6963314.html
git报错及解决
发表于
更新于
git diff --name-status master 5803a9f7baf2043c911000d1d31694f0a7ffa2d6 fatal: ambiguous argument 'master': unknown revision or path not in the working tree. Use '--' to separate paths from revisions 可能没有HEAD git branch -r 看看 解决,直接删除这个项目,再clone一份
dos总结
发表于
更新于
SchTasks /Query C:\Users\WATSON.ZENG> 错误: 无法加载列资源。 chcp 437 再执行
elk没有最新日志原因
发表于
更新于
logstash报错 [2019-07-07T21:21:46,183][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}) 因为ES集群有一个磁盘满了 先删除磁盘 再执行 curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}' https://benjaminknofe.com/blog/2017/12/23/forbidden-12-index-read-only-allow-delete-api-read-only-elasticsearch-indices/
django总结
发表于
更新于
1.7版本以上重新创建表 https://blog.csdn.net/hanglinux/article/details/75645756 { "detail": "'staticfiles' is not a registered tag library. Must be one of:\nadmin_list\nadmin_modify\nadmin_static\nadmin_urls\ncache\nfuture\ni18n\nl10n\nlog\nrest_framework\nstatic\ntz" } 不要用Response ,用 JsonReponse {"detail": " is not JSON serializable"} dict或list里包含了 Objcet 类型的数据 中文需要指定字符集 idc_node_list = [u'运维审批'] task_list = [u'运维审批', u'啊啊水电费'] idc_node = list(set(idc_node_list).intersection(set(task_list)))
node安装
发表于
更新于
yarn 前端项目要用来打包 wget http://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.gz tar zxvf node-v8.9.4-linux-x64.tar.gz mv node-v8.9.4-linux-x64 /usr/local/ vim /etc/profile #nodejs export NODE_HOME=/usr/local/node-v8.9.4-linux-x64 export PATH=$NODE_HOME/bin:$PATH source /etc/profile npm install -g yarn yarn -v http://nodejs.org/dist/v8.15.1/
centos7安装django
发表于
更新于
yum install python36 curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python36 get-pip.py pip3 install Django==2.1.*
监听文件变化
发表于
更新于
import pyinotify wm = pyinotify.WatchManager() notifier = pyinotify.Notifier(wm) wm.add_watch('/tmp/', pyinotify.ALL_EVENTS, rec=True) notifier.loop()
tcpdump抓包 wireshark分析
发表于
更新于
tcpdump tcp -i eth0 -t -s 0 -c 100 and dst port ! 22 and src net 192.168.3.0/24 -w ./target.cap tcpdump -i eth0 port 11800 -s 0 -c 100 and src net 192.168.1.0/24 -w php_data.cap 在wireshark打开