Code Thoughts 区分指针变量与数组变量 虽然经常说数组变量其实就是指向数组首个元素的指针,但两者实际上是不同的东西。指针作为指向目的地址的变量,其本身也要占据一定内存空间,而数组作为一段连续的储存空间,声明时的变量其实就是首元素的地址本身,相当于起了个别名,这个别名本身不占用内存空间,访问时也不需要间址。 例如:
Arch 优化杂记 关闭CPU漏洞环境措施以提高性能 添加内核参数:mitigations=off 使用TLP延长待机时间 安装软件包:tlp tlp-rdw ethtool smartmontools 启用 NetworkManager-dispatcher.service 屏蔽 systemd 服务
禁用看门狗 默认分类 NOTE: 这篇文章迁移自旧博客(typecho) 用 journalctl -b -1 | grep watchdog 找到看门狗硬件名称 然后在 /etc/default/grub 添加内核参数,比如我的硬件名称是 wdat_wdt,添加 modprobe.blacklist=wdat_wdt
Wayland WM下网易云音乐平替 默认分类 NOTE: 这篇文章迁移自旧博客(typecho) go-musicfox + mpd + mpc + waybar 可以在 waybar 进行状态展示,配上 mpc 还能直接在 waybar 进行控制和绑全局快捷键
GitHub SSH代理 (over HTTP) 默认分类 NOTE: 这篇文章迁移自旧博客(typecho) yay -S corkscrew vim ~/.ssh/config 添加以下内容(看情况修改端口): Host github.com User your_name ProxyCommand corkscrew 127.0.0.1 7890 %h
From Neovide Maintainer Cookbook 默认分类 NOTE: 这篇文章迁移自旧博客(typecho) How to keep your sanity Don't think you need to solve, participate in or even notice everything happening. Work on such a pr
From GraphQL documentation 默认分类 NOTE: 这篇文章迁移自旧博客(typecho) We should never be doing string interpolation to construct queries from user-supplied values.
记一个坑 默认分类 NOTE: 这篇文章迁移自旧博客(typecho) Jetbrains系IDE的Format快捷键是Ctrl + Alt + L,网易云的喜欢/取消喜欢的音乐全局快捷键也是Ctrl + Alt + L,一定要改掉!!!不然等着搓半天代码回头看歌单少一堆音乐吧(
一个有意思的问题 默认分类 NOTE: 这篇文章迁移自旧博客(typecho) 本站主页的background-image是通过调用 https://img.paulzzh.com/touhou/random 接口获取的随机图片,即每次访问时的背景图都是不同的。 假设有次我打开这个博客,发现这个网站的背景图我很喜欢,想保存下来