Skip to content

Instantly share code, notes, and snippets.

View SoapyMan's full-sized avatar

Ilya SoapyMan

View GitHub Profile
@SoapyMan
SoapyMan / generate_virt_gpu_scripts.sh
Created May 1, 2023 10:10
Generate virsh scripts for GPU attach/detach
#!/bin/bash
mkdir "gen"
# Detect GPU and HDMI audio device PCI IDs
gpu_pci_ids=$(lspci -nnk | awk '/VGA|3D|Display/ && /NVIDIA|AMD/ {print $1}')
hdmi_audio_device_pci_ids=""
for gpu_pci_id in $gpu_pci_ids; do
echo "GPU Device $gpu_pci_id"
@SoapyMan
SoapyMan / imgui_curve.hpp
Last active April 9, 2025 20:58
ImGui 1D Curve Editor Control
// [src] https://github.com/ocornut/imgui/issues/123
// [src] https://github.com/ocornut/imgui/issues/55
// v1.23 - selection index track, value range, context menu, improve manipulation controls (D.Click to add/delete, drag to add)
// v1.22 - flip button; cosmetic fixes
// v1.21 - oops :)
// v1.20 - add iq's interpolation code
// v1.10 - easing and colors
// v1.00 - jari komppa's original
@SoapyMan
SoapyMan / oculus.md
Last active April 22, 2021 16:02
Oculus Link - using Steam and SteamVR Dashboard instead of Oculus Dash and Oculus Client/Store

This is working proof. Document is draft/WIP.

  1. Install Oculus Software
  2. Install SteamVR
  3. Launch your Rift/Oculus Link and configure your headset, set the needed graphics etc
  4. Exit your VR, close all Oculus applications.
  5. Go to your Oculus Software folder <Oculus>/Support/oculus-dash/dash and move,rename or delete bin folder.
  6. Go to your Steam folder <Steam>/SteamApps/common/SteamVR/bin and copy win64 folder into <Oculus>/Support/oculus-dash/dash/bin.
  7. Rename /Support/oculus-dash/dash/win64 to bin
@SoapyMan
SoapyMan / config.h
Last active February 9, 2021 18:51
Android makefile for OpenAL Soft 1.21.1 - for those who struggle with XCompile
/* API declaration export attribute */
#define AL_API __attribute__((visibility("protected")))
#define ALC_API __attribute__((visibility("protected")))
/* Define if HRTF data is embedded in the library */
#define ALSOFT_EMBED_HRTF_DATA
/* Define if we have the posix_memalign function */
/* #undef HAVE_POSIX_MEMALIGN */