随笔分类 -  脚本

摘要:下面是我的配置: 创建 logback-spring.xml 写入下面的配置 <?xml version="1.0" encoding="UTF-8"?> <configuration debug="false"> <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 --> 阅读全文
posted @ 2023-04-27 16:58 林宇风 阅读(337) 评论(0) 推荐(0) 编辑
摘要:原文地址: https://www.jb51.net/article/51902.htm @echo off echo "请注意你的杀毒软件提示,一定要允许" @echo ######################################## @xcopy C:\Windows\syste 阅读全文
posted @ 2021-07-06 11:18 林宇风 阅读(1066) 评论(0) 推荐(0) 编辑
摘要:原文地址: https://www.cnblogs.com/mingbai/p/dockerclean.html 越往下的,越要慎重 列出无用的卷 docker volume ls -qf dangling=true 清理无用的卷,容器,镜像 docker volume rm $(docker vo 阅读全文
posted @ 2021-06-17 14:42 林宇风 阅读(435) 评论(0) 推荐(0) 编辑
摘要:原文: https://blog.csdn.net/pjymyself/article/details/81669928 现有如下需求:需要将字符串 1,2,3,4,5,6,7 拆分成: 1 2 3 4 5 6 7 分析: 为了完成上述功能,在mysql中提供了一些字符串操作的函数,其中SUBSTR 阅读全文
posted @ 2021-01-13 13:20 林宇风 阅读(6330) 评论(0) 推荐(0) 编辑
摘要:统一按M显示 find . -type f -size +200M 2>/dev/null|xargs du -shm|sort -nr 结果: 1570 ./mysqlbak/mysqldata20201203.sql 1326 ./data/mysql-bin.000209 按照M或者G显示 f 阅读全文
posted @ 2020-12-08 16:56 林宇风 阅读(261) 评论(0) 推荐(0) 编辑
摘要:ps -ef|grep 关键词 | grep -v grep | awk '{print $2}' | xargs -t kill -9 阅读全文
posted @ 2020-11-20 16:22 林宇风 阅读(239) 评论(0) 推荐(0) 编辑
摘要:1. SpringMvc形式 import com.alibaba.fastjson.JSON; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.Respo 阅读全文
posted @ 2020-11-17 10:51 林宇风 阅读(244) 评论(1) 推荐(0) 编辑
摘要:线上的node服务经常宕机,不太稳定. 于是写了个监听脚本,配合linux的crond定时任务进行检测. 监听脚本listen: #!/bin/bash LOG_FILE="/home/listen.log" #检测node curtime=$(date "+%Y-%m-%d %H:%M:%S") 阅读全文
posted @ 2020-11-10 18:21 林宇风 阅读(839) 评论(0) 推荐(0) 编辑
摘要:原文地址: https://blog.csdn.net/KingJulien2/article/details/88180337 在 Customize Rules 中加入下面代码 【添加代码】 //响应用时(这段也是在网上找的) function BeginRequestTime(oS: Sess 阅读全文
posted @ 2020-10-16 15:50 林宇风 阅读(1902) 评论(0) 推荐(1) 编辑
摘要:删除es索引,自带的仅支持abc*形式的索引.如果想删除*abc*类似的就无能为力了,写个shell脚本实现下 #!/bin/bash for i in $(curl localhost:9200/_cat/indices?v | grep '*abc*' -o | awk '{print $3}' 阅读全文
posted @ 2020-10-10 09:51 林宇风 阅读(929) 评论(0) 推荐(0) 编辑
摘要:/** * Copyright (c) 2005-2009 springside.org.cn * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * <p> * $Id: SpringContextHold 阅读全文
posted @ 2020-09-18 09:55 林宇风 阅读(284) 评论(0) 推荐(0) 编辑
摘要:使用fiddler抓包,有的http请求抓不到数据显示443,很费解!但是有的就可以,偶遇如下解决方案,试了下解决了。道声谢!!! 前提装好fiddler配置好代理,然后安装好证书 找到右侧选项卡: FiddlerScript > Go to > 下拉选择 OnBeforeRequest,把下边代码 阅读全文
posted @ 2020-09-18 09:21 林宇风 阅读(5927) 评论(0) 推荐(1) 编辑
摘要:原文地址: https://www.cnblogs.com/gmq-sh/p/5942065.html /** * 根据属性名获取属性值 * */ private Object getFieldValueByName(String fieldName, Object o) { try { Strin 阅读全文
posted @ 2020-09-03 21:03 林宇风 阅读(5261) 评论(0) 推荐(0) 编辑
摘要:调试安卓通过fiddler代理进行抓包,每次设置代理都很麻烦,网上参考了多篇博客,总结一下整个操作流程 1. 连接模拟器 下载逍遥模拟器 http://www.xyaz.cn/ ,安装; 打开逍遥模拟器,设置-关于平板电脑-疯狂的点版本号-返回设置里面就有了开发者选项,点开打开usb调试即可; 安装 阅读全文
posted @ 2020-08-18 10:58 林宇风 阅读(2692) 评论(0) 推荐(1) 编辑
摘要:需要把前后端分离的项目部署到服务器,前端静态资源通过nginx代理访问,接口请求代理到指定端口的服务上,先看配置: server { listen 4040; server_name 127.0.0.1; location / { root /opt/demo/static; index index 阅读全文
posted @ 2020-07-22 16:37 林宇风 阅读(6938) 评论(0) 推荐(1) 编辑
摘要:脚本名: mgrep #!/bin/bash source=/opt/dwebvideo_tomcat/logs/catalina.out a=10 # 读取输入 if [ -n "$2" ]; then a=$2 fi echo -e "\e[31m >>>--结果: > \e[0m" grep 阅读全文
posted @ 2020-07-14 14:38 林宇风 阅读(2302) 评论(0) 推荐(0) 编辑
摘要:有一段线上日志: 2020-07-14 11:37:04.556 INFO [com.lyf.action.PlayAction:124] - [ 播放日志 add ] userid: 0 vid: 8079245, vtime: -1 ┏━━━━━ Debug [native.update d_s 阅读全文
posted @ 2020-07-14 14:30 林宇风 阅读(947) 评论(0) 推荐(0) 编辑
摘要:原文地址: https://blog.csdn.net/kerryqpw/article/details/81453493 后台开发中经常需要给前端提供接口,返回的字段为null的时候需要设置字段的默认值。 针对不同的数据库实现方式有: sqlserver: select isnull(字段,0) 阅读全文
posted @ 2020-07-03 14:07 林宇风 阅读(3297) 评论(0) 推荐(0) 编辑
摘要:命令: telnet ip port 退出: ctrl+] + quit 查看端口: netstat -an|grep 80 或者: netstat -ntulp |grep 80 查看程序使用的端口 netstat -ntulp |grep redis 参考: https://www.cnblog 阅读全文
posted @ 2020-07-01 12:54 林宇风 阅读(6128) 评论(0) 推荐(0) 编辑
摘要:创建文件pull复制下面脚本(日志路径自己修改),然后更改权限chmod 777 pull #!/bin/bash # 需要读取的文件 source=/opt/logs/catalina.out # 生成文件 dist=log # 快速截取,有冒号根据时间匹配截取,没有截取行数 if [[ $1 ! 阅读全文
posted @ 2020-06-30 10:32 林宇风 阅读(238) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示