Skip to content

Instantly share code, notes, and snippets.

View waltercool's full-sized avatar

WalterCool waltercool

View GitHub Profile
@waltercool
waltercool / gist:bc73b6ba143ea5c02708a650c6b6dfc1
Last active July 17, 2026 15:44
RK3588 Local AI Setup Guide (Orange Pi 5 Plus)
@waltercool
waltercool / z13-audio-fix-summary.md
Created July 16, 2026 15:17 — forked from sankao/z13-audio-fix-summary.md
ROG Flow Z13 2025 Audio fix

ROG Flow Z13 2025 Audio fix

ROG Flow Z13 2025 (ai max 395) Audio Fix

Disclaimer: I don't know much about kernel development, this fix was figured out with AI assistance.
My problem was that the speakers work but are way quieter than Windows. Kernel logs show:

cs35l41-hda: Falling back to default firmware.

The fix is simple: copy-paste the ROG Ally entry with a different device ID. It solves the audio problem subjectively (we're far from amazing sound, but at least twice as loud).

import time
import os
import logging
import random
from datasets import load_dataset
class QuantAutoGPTQ:
def __init__(self, model_name_or_path, output_dir, dataset,
num_samples=128, trust_remote_code=False, cache_examples=True,
use_fast=True, use_triton=False, bits=[4], group_size=[128], damp=[0.01],
@waltercool
waltercool / process_ucode.sh
Last active April 2, 2021 18:35
Process Intel Microcode for your system only.
#!/bin/sh
# This tool requires git and iucode_tool.
# iucode_tool can be found at most repositories, or https://gitlab.com/iucode-tool/
#
# This script is NOT DESIGNED to be run as root. You must manually copy the output at the
# intel firmware folder. This is for security reasons.
MICROCODE_DATA="/tmp/microcode_data"
OUTPUT="microcodes"
How to connect USB through debug console
device_add usb-host,vendorid=0xL33T,productid=0xDEMO,id=whatever
(Obtain values from L33T and DEMO with lsusb)
Make sure to provide QEMU access to /dev/bus/usb/X/Y, take X and Y from dmesg values
@waltercool
waltercool / gist:0723f53ed479c25061bcdb1178198c97
Last active August 24, 2020 09:44
ffmpeg personal swissknife
# Compress x265 with deinterlace using Cuda
ffmpeg -hwaccel cuvid -i <INPUT> -pix_fmt p010le -vf yadif -c:v hevc_nvenc -preset slow -acodec copy <OUTPUT> #NOT WORKING ANYMORE
ffmpeg -i <INPUT> -vf yadif=parity=auto -vcodec hevc_nvenc -acodec copy -preset slow <OUTPUT>
# Merge Video+Audio
ffmpeg -i <Video> -i <Audio> -codec copy -shortest <OUTPUT>
# Extract audio from Video under Mono
ffmpeg -i <VIDEO> -vn -ac 1 <Audio>
@waltercool
waltercool / gist:dfe52ad1868939fd36825c565363e4a5
Last active February 15, 2019 22:56
Sidekiq Swiss Knife
# Clear all sidekiq scheduled
require 'sidekiq/api'
Sidekiq::ScheduledSet.new.clear
# Clear an specific queue by job name
jobs = Sidekiq::ScheduledSet.new.select {|retri| retri.klass == 'job_name' }
jobs.each(&:delete)
@waltercool
waltercool / vimdiff.md
Created January 18, 2019 19:50
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@waltercool
waltercool / varnish-purge-cache.sh
Created October 16, 2018 23:18
Purge all Varnish cache.
# Purge all Varnish cache
varnishadm "ban req.url ~ /"
@waltercool
waltercool / gist:b3247dfc562b6e29683295918d49f323
Last active October 12, 2018 14:51
Excluding ElasticSearch node and migrate all it data for shutdown or maintainance operations
curl -XPUT <hostname-or-IP>:9200/_cluster/settings -H 'Content-Type: application/json' -d '{
"transient" :{
"cluster.routing.allocation.exclude._ip" : "X.X.X.X"
}
}'