上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 24 下一页
摘要: 在/usr/share/applications这个目录,其中存放的全部是所有用户可见的快捷方式。在该目录创建xxx.desktop文件即可。具体操作步骤为: 命令行操作内容: cd /usr/share/applications sudo gedit xxx.desktop 打开需要编辑的文本内容 阅读全文
posted @ 2022-01-26 10:53 LiuChengloong 阅读(303) 评论(0) 推荐(0) 编辑
摘要: JS 方法 <style> .no-print { cursor:pointer; } @media print { .no-print, .no-print * { display: none !important; } } </style> <script> function printHtml 阅读全文
posted @ 2022-01-25 09:22 LiuChengloong 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 常用 shell 脚本记录 判断输入参数是否是合理参数 #!/bin/bash port= read -p "请输入 8184|8185: " port echo -e '\n' case $port in '8184' | '8185') echo $port;; *) echo "请输入 818 阅读全文
posted @ 2022-01-12 09:20 LiuChengloong 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 安装 code-server github code-server 下载 deb 包 deb 安装包 sudo dpkg -i code-server.deb 修改 ~/.config/code-server 中 config.yaml 中 code-server 访问的 bind-addr pas 阅读全文
posted @ 2021-12-29 14:19 LiuChengloong 阅读(28) 评论(0) 推荐(0) 编辑
摘要: Mysql binlog 相关 MySQL 修改密码 sudo -s mysql use mysql ALTER USER root@localhost IDENTIFIED WITH caching_sha2_password BY '123456' MySQL 允许 root 远程登录 mysq 阅读全文
posted @ 2021-12-16 16:26 LiuChengloong 阅读(790) 评论(0) 推荐(0) 编辑
摘要: Linux关机,重启 # 关机 shutdown -h now # 重启 shutdown -r now 建立软连接 ln -s /usr/local/jdk1.8/ jdk sshkey # 创建sshkey ssh-keygen -t rsa -C your_email@example.com 阅读全文
posted @ 2021-12-15 10:22 LiuChengloong 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 对项目进行性能分析,往往需要查看 CPU 耗时,了解瓶颈在哪里。火焰图(flame graph)是性能分析的利器。 我这里使用的是 async-profiler 这个开源项目,项目地址为: https://github.com/jvm-profiling-tools/async-profiler.g 阅读全文
posted @ 2021-12-08 14:22 LiuChengloong 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 延迟任务设计思路 入队操作:ZADD KEY timestamp task, 我们将需要处理的任务 按其需要延迟处理时间作为 Score 加入到 ZSet 中。Redis 的 ZAdd 的时间复杂度是 O(logN),N是 ZSet 中元素个数,因此我们能相对比较高效的进行入队操作。 起一个进程定时 阅读全文
posted @ 2021-12-07 15:30 LiuChengloong 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 要设计一个高性能的系统,那么缓存肯定是一个绕不开的话题,合理使用缓存可以使得系统变得更“快”,响应时间也能大大减少。 那么如何设计一个缓存呢,这里将我系统现有的一个缓存功能记录下来,方便以后使用。这是一个简单的 K-V 的本地缓存,使用 Caffeine 作为具体的本地缓存框架,并且可以方便的更换底 阅读全文
posted @ 2021-12-07 14:30 LiuChengloong 阅读(72) 评论(0) 推荐(0) 编辑
摘要: ### 备份源 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak ### 新增源 sudo vim /etc/apt/sources.list ### 20.04 阿里云: deb http://mirrors.aliyun.com/ub 阅读全文
posted @ 2021-12-03 08:47 LiuChengloong 阅读(393) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 24 下一页