Skip to content

Instantly share code, notes, and snippets.

@shore0549
shore0549 / maven依赖冲突
Created February 18, 2022 10:29
maven依赖冲突
解决依赖冲突,maven命令
dependency:tree -Dverbose -Dincludes=springboot
maven选择依赖的规则:
路径依赖层级越短越优先, 谁先声明使用用。也就是pom里面位置越靠前越先使用。
tcp抓包某个端口:
tcp.dstport==8080 and ip.dst==10.73.23.12
tcp.srcport==8081 and ip.src==10.73.23.12
http抓包
http and ip.dst==192.168.0.1
@shore0549
shore0549 / gist:eb643eb9f53451db8cbfda0ca5a6b164
Created October 26, 2021 02:52
netty实现同步“请求-响应”的同步通信机制
https://segmentfault.com/a/1190000020507086
http里面
的添加
upstream myweb{
server 127.0.0.1:10010;
server 127..7.7.1:8888;
}
server{
listen 80;
listen 19999;
@shore0549
shore0549 / gist:6754b86c49c763f54c2d7b384e79a927
Last active February 24, 2022 10:48
通过springboot跳转到war包外面的html文件
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter{
@value("${tomcat.doc-base:}")
private String docBase;
@bean
public TomcatServletWebServerFactory tomcat(ServerProperties properties){
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
window查看某端口:
netstat -na |findstr 8080
工作在网络层的命令ping
windows下追踪路由:tracert www.baidu.com 大致看清楚本机到百度服务器之间的路径。
linux下追踪路由:traceroute www.baidu.com
查看tcp服务端
linux是:netstat -nltp|grep 8080
netstat -na|grep 8080 可以查看有几个tcp客户端
vlogu 一款非常不错的手机视频剪辑软件.
listen1 一款非常棒的pc端音乐软件.
#经常需要修改node配置,命令失效,可以查看路径,然后去修改文本
npm config list
#查看安装了多少个node版本
nvm list
#设置仓库
npm set registry http://www.noderepository.com
npm i oracle
@shore0549
shore0549 / gist:b6eae89e58ef7084bd2a04db920985b1
Last active May 28, 2020 06:51
websocket简单js测试
var ws = new WebSocket("ws://localhost:8100");
ws.onopen = function(){
console.log("连接建立");
var text = {};
text.name ="dawsen";
var json = JSON.stringify({'name':'dawsen'});
ws.send(json);
};
@shore0549
shore0549 / gist:bbe4a92c75c549317c0841d4eaac95dd
Last active May 11, 2021 14:29
linux临时开启防火墙端口
临时开启端口给外网访问(linux默认禁止的)
iptables -I INPUT -p tcp --dport 5200 -j ACCEPT
另外: iptables -I INPUT -p tcp --sport 11221 -j ACCEPT 这是什么意思?
查看系统版本: cat /etc/redhat-release
centos7查看防火墙状态:firewall-cmd --state
centos7永久开启某个端口8080:
firewall-cmd --zone=public --add-port=8080/tcp --permanent