// demo.c
void _start() {
// 1. 调用 write(1, "Hello\n", 6)
const char *msg = "Hello\n";
long syscall_nr = 1; // write 的系统调用号
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <signal.h> | |
| #include <ucontext.h> | |
| void handle_fpe(int sig, siginfo_t *info, void *ucontext) { | |
| printf("Caught SIGFPE! Attempting to skip the broken instruction...\n"); | |
| // 强制转换为 ucontext_t 结构体指针 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
先设置sudo ydotool免密执行。
首先使用另一个设备连接上电脑的ssh。在电脑的tty下运行./start-random-display,后面等待的十秒内,走离电脑屏幕。待十秒后随机桌面启动后,在ssh连接的终端中运行./manage-game start,自动启动Steam并进入游戏(一分钟多一点)。然后可以回到电脑旁。
完成之后,在ssh终端中使用./manage-game exit退出,再./close-display退出桌面,准备进行下一轮。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # --- 配置区 --- | |
| SAMPLE_RATE = 44100 | |
| FREQUENCY = 800.0 | |
| DURATION = 15 | |
| # 你的 USB 设备关键字(用于 grep 匹配) | |
| DEVICE_KEY = "usb-C-Media_Electronics_Inc._USB_Audio_Device-00" | |
| # aplay 完整设备路径 | |
| DEVICE_PATH = "pulse:alsa_output.#{DEVICE_KEY}.analog-stereo" |
力竭了
freq-compress in.wav out.wav -c 512
ffmpeg -i out.wav -f s16le - | ffmpeg -f s16le -ac 2 -ar 44100 -i pipe:0 -filter:a 'atempo=0.5' out2.wav -y
mpv out2.wav全损
Pulse设备:
radioout=alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.mono-fallback
radiosink=alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo把电台接收回放到电脑
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feb 13 00:40:42 bczhc-arch systemd-journald[409]: Journal stopped | |
| Feb 13 00:40:42 bczhc-arch systemd-udevd[453]: Failed to remove file descriptor "config-serialization" from the store, ignoring: Connection refused | |
| Feb 13 00:40:42 bczhc-arch systemd-journald[409]: Received SIGTERM from PID 1 (systemd-shutdow). | |
| Feb 13 00:40:42 bczhc-arch systemd-shutdown[1]: Sending SIGTERM to remaining processes... | |
| Feb 13 00:40:42 bczhc-arch systemd-shutdown[1]: Syncing filesystems and block devices. | |
| Feb 13 00:40:42 bczhc-arch systemd-shutdown[1]: Watchdog running with a hardware timeout of 10min. | |
| Feb 13 00:40:42 bczhc-arch systemd-shutdown[1]: Using hardware watchdog /dev/watchdog0: 'intel_oc_wdt', version 0. | |
| Feb 13 00:40:42 bczhc-arch kernel: watchdog: watchdog0: watchdog did not stop! | |
| Feb 13 00:40:42 bczhc-arch systemd[1]: Watchdog running with a hardware timeout of 10min. | |
| Feb 13 00:40:42 bczhc-arch systemd[1]: Using hardware watchdog /dev/watchdog0: 'intel_oc_wdt', version 0. |
NewerOlder