Skip to content

Instantly share code, notes, and snippets.

View levihuayuzhang's full-sized avatar

Levi Schwarzman levihuayuzhang

View GitHub Profile
@levihuayuzhang
levihuayuzhang / fix-DSD-thinkBook-16p-g4-IRH-linux-6.7.0-rc2.patch
Last active February 20, 2025 07:42
Workaround for Lenovo Thinkbook 16p Gen4 IRH sound issue (Should be fixed in Linux v6.8 or later)
From 86d1cc3e8e024c6776424f09108030fabe67cf5f Mon Sep 17 00:00:00 2001
From: Huayu Zhang <[email protected]>
Date: Thu, 11 Jan 2024 16:18:29 +0800
Subject: [PATCH] add _DSD for SSID 0x17aa38a9 and 38ab (ThinkBook 16p G4 IRH)
the dmseg has following output after patching:
[ 4.401426] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: Cirrus Logic CS35L41 (35a40), Revision: B2
[ 4.455038] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: Cirrus Logic CS35L41 (35a40), Revision: B2
[ 6.362589] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: CS35L41 Bound - SSID: 17AA38A9, BST: 1, VSPK: 1, CH: L, FW EN: 1, SPKID: 0
@levihuayuzhang
levihuayuzhang / chromium-sync-macOS.md
Last active January 14, 2023 18:15
Use Chromium with google sync service on macOS
  1. Download your native chromium

  2. get api-key and install it follow this link

  3. Remember to add your account (that need to sync with chromium) to following group while doing 2nd step:

  1. set env vars:
@levihuayuzhang
levihuayuzhang / clash.service
Created January 6, 2023 15:26 — forked from akillcool/clash.service
clash auto start and update subcribe configuration
# edit and save this file to /usr/lib/systemd/system/clash.service
[Unit]
Description=clash
After=network.target
[Service]
WorkingDirectory="your home directory"/.config/clash
ExecStart="your home directory"/.config/clash/start-clash.sh
ExecStop="your home directory"/.config/clash/stop-clash.sh
Environment="HOME=your home directory"
@levihuayuzhang
levihuayuzhang / google-chrome-linux-dark-mode.md
Last active January 13, 2023 23:13
Linux Google Chrome Dark Mode

Solution 1

  1. copy .desktop file to user directory
cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/google-chrome.desktop
  1. modify that file
sed -i 's;/usr/bin/google-chrome-stable;/usr/bin/google-chrome-stable --enable-features=WebUIDarkMode --force-dark-mode;g' ~/.local/share/applications/google-chrome.desktop

Solution 2

@levihuayuzhang
levihuayuzhang / alarm-m1-vm-build.md
Created January 2, 2023 07:20
Arch Linux ARM build for M1 (Apple Silicon) VMs

Arch Linux ARM build for M1 (Apple Silicon) VMs

This guide is for building your own Arch Linux ARM VM image and runnig in QEMU, UTM, Parallels...

Preparations in Linux

What you need in Linux phase:

1. qemu-img
2. fdisk
3. kpartx
4. bsdtar
@levihuayuzhang
levihuayuzhang / vscode-cmake-debug-lldb-f5.md
Created December 31, 2022 23:47
MacOS VS Code Debug using CMake extension (Pressing F5)

When I want to use CMake extention of VS Code in MacOS to debug program using LLDB, it requre some set up to use F5 button.

  1. Install VS Code, LLVM, CMAKE and C/C++ extensions.
  1. tasks.json:
@levihuayuzhang
levihuayuzhang / build-mpv_silicon.sh
Last active January 3, 2024 03:29 — forked from dbrookman/build-mpv_silicon.sh
How to build mpv & mpv.app on an Apple silicon (M1 / M2) Mac
#!/usr/bin/env bash
cd mpv
git reset --hard
git clean --force -d -x
git pull origin master
set -x
# use standalone tools, not Xcode's (avoids xcrun errors)