Linux

  • Published on
    ## 命令行方式1 -- 不依赖外部工具 查看当前生效的 scaling_governor ```shell cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ``` 查看可用的 scaling_governor ```shell cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ``` 设置为高性能模式 > 对于台式机来说,我觉得没有什么理由不设置为 performance 模式 ```shell echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ...
  • Published on
    之前为了方便解密客户端日志,我基于 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 用户),于是有了这个文章。 ...
  • Published on
    主要是想从 crx 文件安装一个[扩展](https://github.com/pt-plugins/PT-Plugin-Plus/wiki/install-from-crx) 因为一些原因, 这个扩展可能在 Chrome Web Store 上架的并不是最新版本, 所以只能从 crx 文件安装最新的版本. 但是当前 Chrome 版本已经不再允许直接从 crx 文件安装扩展了 (这里只讨论正常的安装, 不考虑打开开发者模式从文件load的情况). 不过 Chrome 官方也并没有封死路, 只是需要在策略里面添加一个白名单, 才能允许从 crx 文件安装扩展. wiki里面只介绍了 Windows 下载改注册表的方法. ...
  • Published on
    老灯用的是 Nvidia 显卡闭源驱动. 显示器是 4K 的. 这操作基本上是每次装机后必备的, 这里记录下. ## Linux Console 字体太大了 默认情况下有个问题就是: console 下面的字体太大了. 字体太大了, 是因为 frame buffer 分辨率太低了, 最简单的做法就是把 console 字体调小一点. 纯 console 下的字体是点阵字体. 默认的字体有点丑, 装个 terminus 吧: ```shell paru -S terminus-font ``` 切到 console 看下效果: ```shell setfont ter-d14b ``` 我这里设置 14 号是因为默认的太大了, 14相对较小一些. 另外 12 的话点太明显了, 不够清晰. ...
  • Published on
    F36 当前已经 Beta, 不出意外, 4月份应该会正式发布. 由于发现磁盘还有一点空闲空间, 想来可以装一个 F36 玩玩. 主要是想体验它的[默认 btrfs 文件系统](https://fedoraproject.org/wiki/Changes/BtrfsByDefault). 从 [Fedora 33](https://fedoraproject.org/wiki/Releases/33 "Releases/33") 起, btrfs 就已经是Fedora Linux 桌面版本的默认文件系统, 但是老灯当时是从 Fedora 31 升级的, 由于F33之前都是默认 ext4, 因此, 即使升级到 F33, 也还是用的 ext4. ...
  • Published on
    正如 Apple-Music-Electron repo 上简介里说的: > 适用于Windows,Linux和macOS的非官方Apple Music应用程序,而无需安装iTunes或通过浏览器使用极其臃肿的Web应用程序。 这也是老灯在 Linux 下要这么一个 app 的原因。对于老灯来说,浏览器在大部分情况下都是用来浏览文档,调试代码。里面夹杂着一个在线音乐播放网站可不好找,特别是tab非常多的情况下。因此,有一个独立的 app 就非常重要的。哪怕只是拿 Electron 框架包裹一下 https://beta.music.apple.com/ , 老灯也觉得这类 app 非常有意义。Life changed. ...
  • Published on
    ## The good 1. [DeltaRPM](https://fedoraproject.org/wiki/Features/Presto) 是个好东西,可以节省更新的流量和本地cache的package空间 [Fedora Linux](https://en.wikipedia.org/wiki/Fedora_Linux "Fedora Linux") has supported binary delta updates by default using the [yum](https://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified "Yellowdog Updater, Modified") presto plugin since June 2009. This is based on [RPM Package Manager](https://en.wikipedia.org/wiki/RPM_Package_Manager "RPM Package Manager")'s deltarpm system (2004), which was in turn based on bsdiff.\[[1]](https://en.wikipedia.org/wiki/Delta_update#cite_note-1)  ...
  • Published on
    > this article first post on 2021-01-25 > updated on 2023-08-28 起因主要是想给我fork自convco的[git-cz](https://github.com/ttys3/git-cz) 项目 release 那里增加一个Mac二进制文件方便使用Mac的人下载。 这是一个方便使用约定式提交记录的git工具. ![git-cz-screen-record.gif ](git-cz-screen-record.gif) ## Environment ``` OS: Fedora 38 (Workstation Edition) x86_64 CPU: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz x86_64 ...
  • Published on
    其实我安装 lua5.1 只是为了方便兼容 neovim 和 luajit, 这两货目前都只支持lua 5.1 其实根本原因还是在于 luajit 多年没更新(如果我没记错,现在已经2021年了,luajit最后一次发版还是2017年?),没有兼容最新版本的lua 5.4 。 而 neovim 实际是因为依赖luajit 才导致依赖 lua 5.1的,也是没办法了. ## 初战翻车 环境说明: 操作系统是 Fedora 33, 默认的 `lua`包是 lua 5.4版本的, `luarocks` 也是从包管理器dnf直接安装的. `luarocks install --local fzy` 失败: > Error: Failed finding Lua header files. You may need to install them or configure `LUA_INCDIR`. ...
  • Published on
    上次写了[《如何从 grub2 启动 Fedora32 Live CD iso》](/post/linux/fedora/how-to-boot-fedora32-live-cd-iso-from-grub2) , 这次顺便把 `Ubuntu` 的也补一下吧。 公司开发环境为了大家统一,全部采用的 Ubuntu. 这年头也很少随身带U盘了,因此,只靠硬盘, 自己能求自己,还是能在关键时候有用的。 ## 下载live cd iso并校验 ```bash curl -LZO https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/groovy/ubuntu-20.10-desktop-amd64.iso ...
  • Published on
    ------------------------------------------------------------------------------------- # 老灯常用镜像源 ## Linux 镜像源 - 清华大学开源软件镜像站 https://mirrors.tuna.tsinghua.edu.cn/ - 中国科学技术大学开源软件镜像 https://mirrors.ustc.edu.cn/ - 上海交通大学 Linux 用户组 镜像源服务 https://mirrors.sjtug.sjtu.edu.cn/ > tuna 和 ustc 的源比较全面, 而 sjtug 的源相对来说比较少,比如 RHEL 系常用的 `epel` 和 `rpmfusion` 都没有。 ...
  • Published on
    English title: Does qBittorrent Directory Watch Support NTFS? [qBittorrent](https://github.com/qbittorrent/qBittorrent) 是一个基于[rb_libtorrent库](https://github.com/arvidn/libtorrent) 的跨平台高性能BT客户端。 这个`libtorrent` 有一个前缀`rb_`的原因是,有一个叫做[RTorrent](https://github.com/rakshasa/rtorrent)的软件已经占用了`libtorrent`这个名字。 而在qB和Deluge里面,通常大家所说的`libtorrent` ,全名是`libtorrent-rasterbar`, 也就是 RHEL包名里的`rb_libtorrent` ...