38 followers [0] 0 篇文章/周
Fedora Linux CPU Frequency Scaling using cpupower

命令行方式1 -- 不依赖外部工具查看当前生效的 scaling_governorcat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 查看可用的 scaling_governorcat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 设置为高性能模式对于台式机来说,我觉得没有什么理由不设置为 performance 模式echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 设置为节能模式echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor...

Sat Mar 23, 2024 08:05
Github is Leaking Your Commit Timezone

之前有一用一个 Chrome 插件优化 Github UI 体验的,叫 refined-github当然现在我已经没有使用了,主要是由于 Github UI 更新太快,有时候它追不太上。容易导致一些奇怪的 UI问题。它有一个神奇的功能是, 你访问他人的 github profile, 或者, 鼠标悬浮在某人头像上时,它会显示出这个用户是在哪个时区,此时此刻他是几点。后面我发现,它其实是通过 github restful api 去获取仓库的 commit log 信息, 然后找到最近的一条是作者本人提交的 commit, 通过 git 本身记录的原 commit log 里的时区,就能知道作者的真正所在时区了。时区信息是如何获取到的?但是你如果直接通过 github ui 去访问一个commit...

Thu Nov 16, 2023 19:58
Cross Compile Darwin Target Under Linux Troubleshooting

之前为了方便解密客户端日志,我基于 https://github.com/Tencent/mars/tree/master/mars/xlog/crypt/decode_log_file_c_impl 写了个简单的命令行工具 xlog-decode。这个工具很简单, 就是支持递归地解密当前目录及其下所有的 xlog 文件 (由于是公司项目,因此 xlog 文件的后缀是统一且固定的)。如 foo/xxx.xlog 会自动解密在同级目录下,变成 foo/xxx.xlog.log最近一次编译还是几年前,这不有童鞋需要我给他编译一个 Mac (Intel CPU版) 版的(ps: 我是 Linux 用户),于是有了这个文章。原本,这应该也是一个一两分钟的活儿, 不过最终折腾的结果是花了接近2个小时。原来的...

Mon Oct 30, 2023 20:10
How to Send Desktop Notifications under Linux

有这个文章是因为,曾经不小心看到了 Arch wiki 里有个神奇的页面, 里面介绍了"回"字的X种写法然后我在 C+ glib2 这种写法上面翻车了: https://wiki.archlinux.org/title/Desktop_notifications#C完全按 wiki 来的:Dependency: glib2 Build with:gcc -o hello_world `pkg-config --cflags --libs gio-2.0` hello_world.c hello_world.c#include <gio/gio.h> int main() { GApplication *application = g_application_new ("hello.world",...

Thu Oct 19, 2023 21:25
关于 OpenZFS

kernel modules以 pve 8 (基于 debian 12) 为例,里面的 zfs 模块在 /lib/modules/$(uname -r)/zfs/ 目录。root@pve:~# ls -lh /lib/modules/$(uname -r)/zfs/ total 4.1M -rw-r--r-- 1 root root 569K Jun 17 13:58 icp.ko -rw-r--r-- 1 root root 241K Jun 17 13:58 spl.ko -rw-r--r-- 1 root root 29K Jun 17 13:58 zavl.ko -rw-r--r-- 1 root root 215K Jun 17 13:58 zcommon.ko...

Sun Oct 8, 2023 21:20
Flameshot troubleshooting

不知道什么时候开始 flameshot 保存到文件的功能不工作了。也没报错。今天抽空看了下。找到了这个 issue https://github.com/flameshot-org/flameshot/issues/207给了我灵感。❯ cat ~/.config/flameshot/flameshot.ini [General] checkForUpdates=false contrastOpacity=188 showStartupLaunchMessage=false 发现配置就这几行。 但是明明 GUI 配置界面显示了保存路径是 /home/ttys3/Pictures/Screenshots 啊?重新进入 general 配置,发现有一个 Prefered save...

Sun Oct 8, 2023 21:20

打造你的专属新闻订阅源

准备好了吗?
开始 14 天试用,无需信用卡。

创建账号