Skip to content

Instantly share code, notes, and snippets.

View levihuayuzhang's full-sized avatar

Levi Schwarzman levihuayuzhang

View GitHub Profile
@levihuayuzhang
levihuayuzhang / BUILD
Created August 14, 2025 09:26 — forked from bsilver8192/BUILD
Basics of generating a compile_commands.json file with Bazel
py_binary(
name = 'generate_compile_command',
srcs = [
'generate_compile_command.py',
],
deps = [
'//third_party/bazel:extra_actions_proto_py',
],
)
@levihuayuzhang
levihuayuzhang / config.yml
Created August 4, 2025 06:55 — forked from trxcllnt/config.yml
basic `clangd` C/C++/CUDA config
# Apply this config conditionally to all C files
If:
PathMatch: .*\.(c|h)$
CompileFlags:
Compiler: /usr/bin/gcc
---
# Apply this config conditionally to all C++ files
If:
@levihuayuzhang
levihuayuzhang / download.sh
Created July 9, 2025 16:49 — forked from Aries0d0f/download.sh
Download all macOS Sonoma Aerial wallpaper
#!/bin/zsh
# This script helps those who want to
# get all Aerial wallpapers on macOS Sonoma
# all at once instead of clicking on settings one by one.
# Dependencies: jq, parallel
# Install all dependencies via `brew install jq parallel`
# After `parallel` installed run `sudo parallel --citation` first to read citation notice (IMPORTANT)
@levihuayuzhang
levihuayuzhang / .wslconfig
Last active March 20, 2025 10:05 — forked from libChan/wsl_clash_proxy.sh
WSL2使用代理
[wsl2]
dnsTunneling=false
networkingMode=NAT # mirrored
dnsProxy=true
autoProxy=true
firewall=false
@levihuayuzhang
levihuayuzhang / keybindings.json
Created January 9, 2024 14:34 — forked from bitterteasweetorange/keybindings.json
setup vscode like neovim
[
{
"command": "projectManager.listGitProjects#sideBarGit",
"key": "cmd+o"
},
{
"command": "expand_region",
"key": "ctrl+=",
"when": "editorTextFocus"
},
@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 / 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)