- Always reply in 简体中文。
- Use context7 for public library/API documentation.
- When given GitHub URLs, use
ghcli to access it, not web fetch. - Never use
pipto install Python packages; always useuv. - Search or browser online source code with
gh.
| #!/bin/bash | |
| readonly UNIT_NAME="antigravity-$(date +%s)" | |
| readonly APP_BIN="/usr/bin/antigravity --verbose" | |
| readonly TRIGGER="Lifecycle#onWillShutdown - end 'antigravityAnalytics'" | |
| echo "[*] Start as: $UNIT_NAME" | |
| systemd-run --user \ | |
| --scope \ |
| import os | |
| import sys | |
| import ctypes | |
| from typing import Tuple, List | |
| def get_argv_address(pid: int) -> Tuple[int, int, bytes]: | |
| """ | |
| Get the memory address of the argv area of a given process. |
今天开始,突然无法正常通过 ALHP 源更新,提示 signature from "ALHP Buildbot <buildbot@alhp.dev>" is invalid:
$ LANG=C sudo pacman -Syu
error: core-x86-64-v4: signature from "ALHP Buildbot <buildbot@alhp.dev>" is invalid
error: extra-x86-64-v4: signature from "ALHP Buildbot <buildbot@alhp.dev>" is invalid
error: core-x86-64-v3: signature from "ALHP Buildbot <buildbot@alhp.dev>" is invalid
error: extra-x86-64-v2: signature from "ALHP Buildbot <buildbot@alhp.dev>" is invalid
Zig is great. But its aggressive minimum Linux kernel support policy—only supporting versions newer than the current Debian LTS kernel, 5.10—makes it unusable on older systems like Kindles, Termux on Android, and old servers.
This guide introduces a simple, minimally invasive patch for the standard library to maximize compatibility with these older devices.
The specific syscall that's breaking compatibility with old kernels is statx, which was introduced in Zig 0.14 (replacing POSIX's fstat).
It appears to be [called in only two places in the standard library](https://github.com/search?q=repo%3Aziglang%2Fzig+language%3AZig+linux.statx%28++NOT+path
| [Command] | |
| Automatic=true | |
| Command=" | |
| copyq: | |
| function hasHtmlDataAndNoImageData(formats) { | |
| let hasHtml = false; | |
| let hasImage = false; | |
| for (const format of formats) { | |
| if (format === mimeHtml) { | |
| hasHtml = true; |
This log documents ACPI calls and driver calls found through reverse engineering the MECHREVO Wujie 14XA laptop (marketed as 机械革命无界 14X 暴风雪版, or Mechrevo Boundless 14X Blizzard Edition).
I am playing with:
N.1.14MRO175.56.51.17I have an Orange Pi that connects to the network via WiFi, and since my network is not very stable, the wireless router side often forcefully disconnects all devices, requiring manual reconnection. This is an annoying thing when I'm out: first, I have to figure out how to SSH to my Pi!
The network manager I use is NetworkManager, which is very modern and user-friendly. Unfortunately, until today its developers were not interested in adding an option to automatically reconnect to hotspots.
In this issue, some developers have suggested using the dispatcher to accomplish this. Well... I wrote a simple script to do this. It will try to restart the NetworkManager service 3 times when the network is disconnected (down event received).
| /** | |
| * Created by w568w on 2017-7-29. | |
| */ | |
| class CommonDrawer : SixPloDrawer { | |
| var w: Int = 0 | |
| var height: Int = 0 | |
| override fun draw(pixmap: Pixmap?, color: Color?) { | |
| this.w = pixmap!!.width | |
| height = (w / 4 * Math.sqrt(3.0)).toInt() |