Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active May 4, 2024 09:26
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@Kodehawa
Kodehawa / README
Last active March 20, 2024 15:37
Low-latency osu pipewire configuration
This is the lowest I could get audio latency to work on my system (Ryzen 5 5700X, 32GB 3600MHz RAM, RX 6700).
Scavenged as much of the man pages as possible to get a configuration close to what https://blog.thepoon.fr/osuLinuxAudioLatency/ gave.
This has given me no crackling nor lag, but it'll depend on your computer.
Use https://github.com/NelloKudo/osu-winello, export STAGING_AUDIO_DURATION=24000 and STAGING_AUDIO_PERIOD=12000 to start.
Try lower, I've been able to do as low as STAGING_AUDIO_DURATION=3500 and STAGING_AUDIO_PERIOD=7000.
To adjust both STAGING_AUDIO_DURATION and STAGING_AUDIO_DURATION, make sure the PERIOD is a multiply of DURATION
(3500 * 2 = 7000 duration, 4000 * 2 = 8000). This gives the highest chance of it to work.
@maximtrp
maximtrp / Orange Pi PC + Arch Linux ARM.md
Last active May 4, 2024 20:03
Guide on how to install Arch Linux ARM on SD card for your Orange Pi PC board

Orange Pi PC + Arch Linux ARM: installation guide

This guide is based on multiple guides as well as official instructions for the other boards found on the Internet:

  1. https://github.com/RoEdAl/alarm-uboot-sunxi-armv7
  2. https://uthings.uniud.it/building-mainline-u-boot-and-linux-kernel-for-orange-pi-boards
  3. https://archlinuxarm.org/platforms/armv7/allwinner/pcduino3

I have gone through all these steps recently and got a working board with my favorite Arch Linux ARM. I hope it will be helpful for someone else.

@unixabg
unixabg / gist:4ca86477b6ad0504d8b9486f1a160057
Created July 22, 2022 23:43
Samsung Chromebook 4 alsa helper script for the glkda7219max
#!/bin/bash
echo Adding microphone to Pulseaudio
grep -qxF 'load-module module-alsa-source device=hw:0,99' /etc/pulse/default.pa || echo 'load-module module-alsa-source device=hw:0,99' >> /etc/pulse/default.pa
echo Adding headphone to Pulseaudio
grep -qxF 'load-module module-alsa-sink device=hw:0,1' /etc/pulse/default.pa || echo 'load-module module-alsa-sink device=hw:0,1' >> /etc/pulse/default.pa
echo Adding headset microphone to Pulseaudio
@drraccoony
drraccoony / readme.md
Last active November 13, 2023 13:22
SteamOS3 on GPD Win 2 (via recovery image)
@xDShot
xDShot / 90-dualsense-no-touchpad-input.rules
Created July 2, 2021 07:36
hid-playstation disable Sony Dualsense touchpad input
# /etc/udev/rules.d/90-dualsense-no-touchpad-input.rules
ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="*Wireless Controller Touchpad", ENV{LIBINPUT_IGNORE_DEVICE}="1"
@peteristhegreat
peteristhegreat / Readme.md
Created June 4, 2021 13:43
WMR, SteamVR, wrong video card please plug your headset into the same graphics card as your primary monitor, no man's sky, NMS

Symptoms

Opening up No Man's Sky, SteamVR pops up an error that says wrong video card please plug your headset into the same graphics card as your primary monitor.

SteamVR stays stuck showing "up next" with the No Man's Sky logo in their waiting room, and No Man's Sky starts working on is own screen (with a view per eye) but never goes to the headset.

Note that this does not happen for any other VR app on my computer.

Answer on the internet

# ALSA monitor config file for PipeWire version "0.3.28" #
properties = {
# Create a JACK device. This is not enabled by default because
# it requires that the PipeWire JACK replacement libraries are
# not used by the session manager, in order to be able to
# connect to the real JACK server.
#alsa.jack-device = false
# Reserve devices.
Pipewire is the replacement for JACK and PulseAudio, Pipewire allows low latency compared to any pulseaudio tweaks
Here is a short list of what you should do to get the lowest latency in Osu!
Higher audio rate equals less latency always, unless you increase your quantum
to calculate node latency for your audio device take the quantum size divided by your audio rate
so 64/96000 = 0.00066666666 * 1000 = 0.6ms this is 0.6ms node latency
To check client latency use pw-top, take the quantum size and the audio rate of the client then use quantum / audio rate * 1000
to get overall latency for the client
@corycorvus
corycorvus / HapticPulse.cs
Created May 19, 2020 18:46
Haptic Vibrate Controller SteamVR and Oculus
using UnityEngine;
using UnityEngine.XR;
using Valve.VR;
// simple library and examples for XR haptics
// note: controllers must be tracking to use haptics
// other examples: https://vrtoolkit.readme.io/docs/vrtk_interacthaptics
public static class HapticPulse