Skip to content

Instantly share code, notes, and snippets.

View bwarden's full-sized avatar
💭
open to work

Brett T. Warden bwarden

💭
open to work
View GitHub Profile
@ThePlenkov
ThePlenkov / boot.sh
Last active October 25, 2025 01:59
Resolve WSL DNS automatically
#!/bin/bash
# Remove existing "nameserver" lines from /etc/resolv.conf
sed -i '/nameserver/d' /etc/resolv.conf
# Run the PowerShell command to generate "nameserver" lines and append to /etc/resolv.conf
# we use full path here to support boot command with root user
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '(Get-DnsClientServerAddress -AddressFamily IPv4).ServerAddresses | ForEach-Object { "nameserver $_" }' | tr -d '\r'| tee -a /etc/resolv.conf > /dev/null
@thornbill
thornbill / post-process.sh
Last active October 2, 2025 16:42
DVR post processing script for Jellyfin
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
PWD="$(pwd)"
die () {
@styks1111
styks1111 / SoundBar
Last active April 19, 2024 15:32
Remote Codes Vizio TV and Vizio Sound Bar
VOLUME UP:
One line: FFA25D:NEC:32
uint16_t rawData[67] = {8980,4486, 544,572, 542,574, 542,572, 542,574, 542,572, 544,572, 542,572, 544,578, 542,1654, 542,1654, 542,1652, 544,1654, 542,1652, 542,1652, 544,1652, 542,1636, 564,1652, 544,572, 544,1652, 542,550, 566,572, 544,572, 542,1652, 542,578, 542,572, 544,1652, 542,572, 542,1654, 542,1652, 544,1652, 544,572, 542,1654, 542}; // NEC FFA25D
uint32_t address = 0x0;
uint32_t command = 0x45;
uint64_t data = 0xFFA25D;
VOLUME DOWN:
One line: FF827D:NEC:32
uint16_t rawData[67] = {8980,4486, 542,572, 544,572, 544,546, 568,572, 544,572, 542,572, 542,572, 544,556, 564,1652, 544,1654, 542,1654, 542,1652, 544,1652, 542,1652, 544,1652, 544,1658, 542,1652, 544,572, 542,572, 544,572, 616,498, 544,572, 544,1654, 542,578, 542,574, 542,1652, 544,1654, 542,1654, 542,1652, 542,1652, 544,572, 544,1634, 564}; // NEC FF827D
@mcastelino
mcastelino / qemu-tracing.md
Last active February 19, 2025 16:45
Tracing QEMU-KVM Interactions

Tracing QEMU-KVM Interactions

But default in linux you can figure out how many times and for what reasons there is a VM Exit from a VM into the kvm kernel module. However given the ubiquity of vhost and the ability of kvm to emulate most device models directly in the kernel, most of those VM exits do not result in a transition from host kernel into the QEMU. The transitions from VM -> kvm -> QEMU are typically the most expensive.

Here we try to figure out how many of the VM Exits result in the invocation of QEMU.

Tracking VM-KVM Interactions

This can be done very simply with perf

@chunter
chunter / pageant-autoload-keys-at-startup.txt
Created June 20, 2017 10:51
Make Pageant autoload keys at startup
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.