自建 NAS

2023年3月4日 · 116 字 · 1 分钟

电视送到了,65 寸。周末自己用一些旧 “玩具” 搭一个简陋 NAS,部署个媒体库,提高观影质量。

阳台洗衣柜,储物柜

2023年2月23日 · 423 字 · 1 分钟

balcony

单机? 双机?

优先考虑双机(洗烘套装),单机(洗烘一体)好像问题比较多。各干各的应该更加专业一点,没有比较过,盲猜的。

什么是 MP4 ?

2022年4月10日 · 1551 字 · 4 分钟

每天都用电子产品看视频,但如果有人提问:“什么是 mp4”? 这个问题,还真有亿点点难。

用 ADB 清理下 Android 手机

2022年4月3日 · 3781 字 · 8 分钟

天翼一号,一款中国电信定制的机子,型号 TYH201H,由海信代工。

  • 手机桌面负一屏是什么天翼云手机
  • 内置很多垃圾软件不能卸载

好用的 docker 镜像

2022年3月6日 · 327 字 · 1 分钟

阿里云盘 webdav

docker run -d --name=webdav --restart=always \
    -p 8080:8080  -v /etc/localtime:/etc/localtime \
    -v /etc/aliyun-driver/:/etc/aliyun-driver/ \
    -e TZ="Asia/Shanghai" \
    -e ALIYUNDRIVE_REFRESH_TOKEN="<YOUR TOKEN>" \
    -e ALIYUNDRIVE_AUTH_PASSWORD="admin" \
    -e JAVA_OPTS="-Xmx1g" zx5253/webdav-aliyundriver

Decrease titlebar height in GNOME 3.19+

2021年10月8日 · 274 字 · 1 分钟

为了用上 fcitx-5,把系统一口气升级到了 ubuntu 21.10 . 升级完发现,Terminal 的标题栏好宽,好难看,接受不了。

__attribute__

2021年10月5日 · 701 字 · 2 分钟

The keyword attribute allows you to specify special properties of variables, function parameters, or structure, union, and, in C++, class members. This attribute keyword is followed by an attribute specification enclosed in double parentheses. Some attributes are currently defined generically for variables. Other attributes are defined for variables on particular target systems. Other attributes are available for functions (see Function Attributes), labels (see Label Attributes), enumerators (see Enumerator Attributes), statements (see Statement Attributes), and for types (see Type Attributes). Other front ends might define more attributes (see Extensions to the C++ Language).

Specifying Attributes of Variables

GoogleTest 的简单使用

2021年10月4日 · 613 字 · 2 分钟

The reliability and robustness of SQLite is achieved in part by thorough and careful testing.

As of version 3.33.0 (2020-08-14), the SQLite library consists of approximately 143.4 KSLOC of C code. (KSLOC means thousands of “Source Lines Of Code” or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 640 times as much test code and test scripts - 91911.0 KSLOC.

上文出自How SQLite Is Tested

v4l2loopback 简单使用

2021年10月1日 · 474 字 · 1 分钟

笔记本升级 Ubuntu:21.10 后,自带的摄像头检测不到了。物理摄像头虽然有贴纸盖着,一般不用,但有时需要测试 webrtc 推流,没有视频采集源也是个麻烦事。winmac 平台都有虚拟摄像头软件,linux 必然也有。网上搜了一下,有个 v4l2loopback 的工具,配合 ffmpeg 可以虚拟摄像头供相关软件采集。

pulseaudio-utils 的简单使用

2021年9月30日 · 1048 字 · 3 分钟

使用 Pulse Audio:

  • 查看 sinks, sources
  • 播放 wav 文件,
  • 录制系统输出的声音
  • 录制指定软件输出的声音
  • 通过代码(c),录制和播放 pcm 数据