归档: 2022

MongoDB 查询指定时间范围

MongoDB 查询指定时间范围1{createdAt:{$gte:ISODate('2022-06-22'), $lte:ISODate('2022-06-23')},updatedAt:{$gte:ISODate('2022-06-23')}}

大日志文件查询

大日志文件查询查询关键字 123cat info.log | grep '1711178968'cat info.log | grep '1711178968' >> temp.log 截取一定时段的日志 1sed -n '/2022-06-23T20:19:11.863/,/2022-06-23T20:31:08.309/p&#x

pathfinding 库的使用

pathfinding 库的使用 安装 1npm install pathfinding 使用 12345678910111213141516let pathfinding = require('pathfinding') // use this for initialization onLoad: function () { va

EC2 安装 CloudWatch 监控内存

EC2 安装 CloudWatch 监控内存官方文档英文:https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-iam-roles-for-cloudwatch-agent-commandline.html 请按照这个步骤:https://mp.weixin.qq.com/s/FmUdQcPx9Xjgiw-A0

EC2安装atop

EC2安装atop12amazon-linux-extras install epelyum install atop

屏蔽敏感字 TS 版

屏蔽敏感字 TS 版关键词屏蔽算法 DFA 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293

全屏覆盖点击效果穿透层实现

全屏覆盖点击效果穿透层实现123456789101112onLoad() { this.coverNode.on(cc.Node.EventType.TOUCH_END, this.onClickTouchEnd, this, true); this.coverNode._touchListener.setSwallowTouches(false);}onDest

全球同服方案

全球同服方案一、集中式架构 平均延迟200ms 最高延迟250ms 智能选路 多通道传输 全路径统计 集中部署在全球网络覆盖较好地区,如北美 二、混合式架构 美国登录集群(300ms) 大厅:北美南美大厅、欧洲中东大厅、亚太大厅(300ms) 区域战斗服:南美战斗服、北美、西欧、东欧中东、香港、大陆(150ms) 全球应用加速 全球CDN节点 全球安全节点:12大清洗中心、防护4T级别清洗

动态创建 cc.AnimationClip

动态创建 cc.AnimationClip12345678cc.resources.load(path, (err, clip: cc.AnimationClip) => { if (err) { return; } let anim = node.getComponent(cc.Animation); anim.addC

svn 强制注释

svn 强制注释 将代码仓库根目录下,hooks文件夹中的pre-commit.tmpl文件重命名为pre-commit pre-commit 123456789101112131415161718192021222324252627REPOS="$1"TXN="$2"# Make sure that the log message contains s

svn 强制注释

svn 强制注释 将代码仓库根目录下,hooks文件夹中的pre-commit.tmpl文件重命名为pre-commit pre-commit 123456789101112131415161718192021222324252627REPOS="$1"TXN="$2"# Make sure that the log message contains s