This is a record for my own passthrough setup, I can finally use a single laptop for windows gaming and linux programming at the same time.
My G14 is GA402RJ(6800HS + 6700s) with MT7922 WiFi/BT card.
At this time, BIOS version is 309.
| .text | |
| // for OpenBSD compatible: https://nullprogram.com/blog/2025/03/06/ | |
| .pushsection .note.openbsd.ident, "a" | |
| .long 8, 4, 1, 0x6e65704f, 0x00445342, 0 | |
| .popsection | |
| .global _entry | |
| _entry: |
| import logging | |
| import os | |
| import json | |
| import datetime | |
| from typing import Iterable, Optional, TypedDict, Union | |
| import urllib.parse | |
| import hashlib | |
| import hmac | |
| import secrets |
| // aarch64-linux-gnu-gcc fuckexposure.c -nostdinc -nostdlib -nostartfiles -e _start -g -o fuckexposure -Wall -static -ffreestanding -fno-stack-protector | |
| #define NULL ((void *)0) | |
| #define O_RDONLY 0 | |
| #define O_WRONLY 1 | |
| #define O_RDWR 2 | |
| #define AT_FDCWD -100 |
| #!/usr/bin/env python3 | |
| ''' | |
| Usage: ./fuckcache.py \ | |
| --mount=type=secret,id=npmrc,target=/root/.npmrc \ | |
| --mount=type=cache,target=/root/.npm \ | |
| --mount=type=cache,id=somecache,target=/var/cache/somecache | |
| like docker RUN instruction | |
| it will product dockerfile and build it |
| <?php | |
| // x86_64 sysv abi only | |
| // simple hello | |
| $code = "" . | |
| "\x48\xc7\xc0\x01\x00\x00\x00" . // mov $0x1 (SYS_write for x86_64), %rax | |
| "\x48\xc7\xc7\x01\x00\x00\x00" . // mov $0x1 (stdout), %rdi | |
| "\x48\x8d\x35\x0b\x00\x00\x00" . // lea 0xb(%rip), %rsi PIE! | |
| "\x48\xc7\xc2\x0d\x00\x00\x00" . // mov $0xd (sizeof("hello world!\n") - 1), %rdx |
| // SPDX-License-Identifier: GPL-2.0-or-later | |
| /dts-v1/; | |
| #include <dt-bindings/gpio/gpio.h> | |
| #include <dt-bindings/input/input.h> | |
| #include "armada-372x.dtsi" | |
| / { | |
| model = "Not Aliyun SAG-100wm"; | |
| compatible = "notaliyun,sag100wm", |
| <?php | |
| /** | |
| * Win32 api utitlities class | |
| * needs to be initialized with W32api::init() | |
| */ | |
| final class W32api | |
| { | |
| private const BASIC_CDEFS = <<<'CDEF' | |
| typedef uint16_t WORD, *PWORD, *LPWORD; |
| from PIL import Image, ImageDraw, ImageOps, ImageStat | |
| """ | |
| convert picture to matrix data uint8 array | |
| this script is too slow... | |
| maybe we should rewrite it in np things |
| #!/bin/sh | |
| mirror_host='mirrors.ustc.edu.cn' | |
| sed -i 's|^#baseurl=|baseurl=|g' /etc/yum.repos.d/fedora* | |
| sed -i 's|^metalink=|#metalink=|g' /etc/yum.repos.d/fedora* | |
| sed -i 's|^download.example/pub/fedora/linux|'"${mirror_host}"'/fedora|g' /etc/yum.repos.d/fedora* |