Archive of

一个永生不死的爱情故事

这是2019年时的一个灵光乍现。本来我是想将它扩展成一个中长篇的,但或者是没有那个才气,又或者是总是找不到时间。那就把这个故事梗概当作超短篇放出来吧,也许能启发什么人写个有意思的故事。

2084,地球人生育率降为0。科技已经高度发达,人类已经战胜衰老。死亡是罕见的,除非发生意外,或者对现世太不满意而选择重活一遍。人类已不再依赖自然进化,或者说人类已经主动拒绝了自然进化。

“叮”你有新邮件。老太太Rose那台老掉牙的iPhone发出了熟悉而又遥远的提示音。

距离上一封电邮,又有十年过去了。“不知道老头子这次会在邮件里说些啥。”Rose嘟囔着颤颤微微地点开了那个提醒。她的老头子D已经死去三十年了,受益于科技的进步,本来以为自己很快会步D后尘离世的Rose一直活到现在。奇怪的,每隔一段时间她是还会收到来自D的电邮,信件的内容仿佛是用某种随机算法生成的。

但是Rose知道,这里面的每一段都是D在世的时候写过的,可能是他的twitter,他的weibo,或者来自他的facebook。每隔几段就一定会出现和 Rose 关联的内容。不尽是甜蜜,也有曾经的争吵。读着他的邮件,体会着过去的酸酸甜甜,恍若他还在世。

这个老头子啊。

Switch Debian from legacy to UEFI boot mode

I updated the Sea BIOS for my DELL Chromebook today, which only supports UEFI boot mode. I don't want to reinstall the system, I thought there must be a way I could convert the legacy mode to UEFI mode. Yes, I found it. this article and this answer helped me out.

可以让Linux在Chromebook上运行的与ChromeOS 一样快吗?

我前两天在Facebook Market上又捡了一台电子垃圾:$50买了一台 Dell Chromebook 11 3120,配置是 2GB 内存,16GB硬盘。卖家之前已刷了Sea BIOS,安装了CloudReady系统,但没有搞定声卡驱动,所以没有声音,也因此他才愿意便宜出售。

我喜欢ChromeOS的流畅,但讨厌不能自由安装软件。那有没有可能在Chromebook上安装Linux并让它跑得几乎与ChromeOS一样快呢?我没有把握,也知道可能性并不大,但我还是想试试。

我在这台Chromebook 上安装了Debian 11系统,目前没有遇到大的问题,声音,蓝牙,wifi,hdmi都能正常工作,除了觉得有点慢,以及从suspend状态复原时系统变得极度缓慢,几乎没有响应。

我在这台Chromebook上目前已经做了以下尝试:

  1. 禁用Wayland
  2. 删除SWAP分区
  3. 升级到最新内核

今天打算再设置下 ZRAM内存压缩。没想到极其简单,有ZRAM Tools加持,一分钟就设置好了。照抄的例子,给ZRAM分配了60%的物理内存。Reference 那就看后续使用效果了,我会过两天再更新这个文章。

「25-05-2023更新」 我卸掉了gnome3,装上了xfce4。这是我在移情gnome之前最喜欢的桌面环境。2G内存毕竟太少了,而gnome太贪心,它吃掉了太多的内存。为了更好的性能,我转向了xfce4,而它也确实没有让我失望。这台小机器现在能做很多事,并且跑得很流畅。我很开心啦!

English Version (Thanks ChatGPT)

I picked up another piece of electronic junk on Facebook Marketplace a couple of days ago: a Dell Chromebook 11 3120 for $50. It came with 2GB of RAM and a 16GB hard drive. The seller had previously flashed Sea BIOS and installed CloudReady, but couldn't get the sound card driver working, so there was no audio. That's why he was willing to sell it cheap.

I like the smoothness of ChromeOS but dislike the limitations when it comes to installing software. So, I wondered if it would be possible to install Linux on the Chromebook and have it run almost as fast as ChromeOS. I wasn't sure and knew it was unlikely, but I wanted to give it a try anyway.

I installed Debian 11 on this Chromebook, and so far, I haven't encountered any major issues. The sound, Bluetooth, Wi-Fi, and HDMI all work fine. The only drawbacks are that it feels a bit slow, and the system becomes extremely sluggish when resuming from suspend, almost unresponsive.

Here are the things I've tried on this Chromebook so far:

  • Disable Wayland in /etc/gdm3/daemon.conf
  • Removing the SWAP partition
  • Upgrading to the latest kernel

Today, I'm planning to set up ZRAM memory compression. Surprisingly, it was incredibly simple with the help of ZRAM Tools. I allocated 60% of the physical memory to ZRAM, following an example I found at Debian Wiki. We'll see how it performs in practice, and I'll update this article in a couple of days.

Update on 25-05-2023: I have uninstalled GNOME 3 and installed XFCE4. This is my favorite desktop environment before switching to GNOME. With only 2GB of memory, it was just too little, and GNOME was too resource-intensive, consuming a significant amount of memory. In order to improve performance, I turned to XFCE4, and it has not let me down. This little machine can now handle many tasks and runs smoothly. I am very happy!"

Don't change the inode when editing a file with Vim

I keep my config files on github, and I use hard-link for most of the config files. It's convenient, as I can check the new changes easily and submit some of the changes when necessary. However, the default behavior of vim troubles me. It always changed the inode when I save the config file!

tldr; the solution is: put the following line in your .vimrc

set backupcopy=yes

PS Though this way fixed Vim's behavior, I sadly found that git pull will change the config file's inode as well. So there is actually no feasible solution. I have abandoned this hard link approach. If you have better solutions to maintain all your config files in one repository, please let me know!

How to delete all bin/obj folders in a complex solution in GitBash

Sometimes we need to delete all the bin/obj folders in a solution to resolve issues in Rider or Visual Studio. I assume you already have your preferred method for this task, but I would like to share my approach here in case someone else is unaware of how to do it in GitBash or MSYS terminal:

#!/bin/bash

set -e

# Find and display directories to be deleted
find . \( -iname "bin" -o -iname "obj" \) -type d -print

# Prompt user for confirmation
read -p "The above folders are going to be deleted, are you sure? [Y/N]: " -n 1 -r
echo    # Move to a new line

# Delete directories if confirmed
if [[ $REPLY =~ ^[Yy]$ ]]; then
    find . \( -iname "bin" -o -iname "obj" \) -type d -exec rm -rfv {} +
    echo "Done"
else
    echo "No"
    exit 1
fi