Skip to content

Instantly share code, notes, and snippets.

@ryrun
ryrun / mk_apt
Created December 5, 2024 08:08
Add delay mk_apt to reduce update reports, based on https://github.com/ypid-bot/check_mk/blob/master/agents/plugins/mk_apt
#!/bin/bash
# Check for APT updates (Debian, Ubuntu)
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2014 [email protected] |
@ryrun
ryrun / shadow_pc_sdl2.md
Created November 23, 2024 13:51
Changing Shadow PC App Gamepad Button Mapping with SDL2 on macOS using SDL_GAMECONTROLLERCONFIG

Changing Shadow PC App Gamepad Button Mapping with SDL2 on macOS

The Shadow PC app uses SDL2 for gamepad recognition. This has the advantage that you can change the button mapping of recognized controllers. You can add a custom configuration for each SDL2 application using the SDL_GAMECONTROLLERCONFIG environment variable. The format is relatively simple:

GUID,Name,Mapping

Currently, I am having issues with Xbox 360 controllers (a Xim Matrix which is using the PC XInput mode) on macOS 15, as they are recognized twice in the Shadow PC app with SDL version 2.24.2 (as of Nov 23, 2024). The problem is described here: GitHub Issue #11002. Since I do not want to wait too long for an update, I use the following mapping to "break" the 360 controller, so no duplicate inputs are sent to Shadow PC:

@ryrun
ryrun / cloud_dienste.md
Last active November 3, 2024 13:05
Clouddienste Auflistung

Bekannte Cloud-Dienste

  1. AirGPU

    • Webseite: https://airgpu.com
    • Ab 0,65 €/Stunde (verschiedene Tiers, unterschiedliche Verfügbarkeit je nach Kontinent)
    • Nutzbar über Browser, Remote Desktop Anwendungen
    • Cloud-GPU-Zugriff für Gaming und Grafikbearbeitung. Flexible Nutzungsmöglichkeiten.
    • Tests / Interviews:
  • Airgpu im Test plus Rabattcode! - Gameplay | Performance | Qualität (11.02.2023):\
@ryrun
ryrun / onedrive-mklink.md
Last active June 14, 2023 17:43
Use mklink to specify specific folder for OneDrive Upload
@ryrun
ryrun / nvidia-profile.inspector-arguments.md
Last active June 12, 2023 14:40
NVidia Profile Inspector, load a nib profile via Shortcut on login
  • create a shortcut for the exefile
  • add this to load a profile: C:\Users\Shadow\Documents\nvidiaProfileInspector\nvidiaProfileInspector.exe -silent "C:\Users\Shadow\Documents\nvidiaProfileInspector\Base Profile.nip"
  • copy the shortcut file to shell:startup
@ryrun
ryrun / screenshotWatcher.ps1
Last active June 2, 2023 16:52
Windows 10 and Windows 11: "Windows Key+Print" Play a sound for Screenshots, when new file is created
# Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser <- default
# Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser <- all scripts
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser <- only local scripts
# Task Sheduler, on Systemstart: PowerShell.exe -ExecutionPolicy Bypass -File "C:\Users\Shadow\Documents\screenshotWatcher.ps1" <- best option
$wav = New-Object System.Media.SoundPlayer
$wav.SoundLocation='C:\Program Files (x86)\Steam\resource\camera1.wav'
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = "C:\Users\Shadow\Pictures\Screenshots"
$watcher.Filter = "*.*"
$watcher.IncludeSubdirectories = $true
@ryrun
ryrun / midi_ch1_exckl.cxx
Last active April 23, 2023 11:52
Bluecat's Plug'N'Script - Midi Channel 1 Exclusive only, when playing
/** \file
* MIDI channel filter.
* Filter MIDI events (keeps only MIDI events for the selected channel).
*/
#include "lib/Midi.hxx"
// metadata
string name="MIDI Channel Special Filter";
string description="Filters events of other channels (when channel 1 is used)";
@ryrun
ryrun / shadow_pc_drs.md
Last active April 16, 2023 14:07
Lock nvidia settings, so it stays after reboot on a Shadow PC

Lock the nvdrsdb0.bin file under "C:\ProgramData\NVIDIA Corporation\Drs"

@ryrun
ryrun / shadow_pc_optimize.md
Last active February 9, 2024 15:23
Optimize Shadow PC Windows 10 system

General for Windows 10 / 11

  • Use Game Ready Driver instead of Geforce Experience (less nvidia process in the background)
  • Disable all non used programms from autostart (use taskmgr / autostart tab)
  • Change windows system "Performance options" to performance (Just enable better fonts rendering)
  • Disable background App in Windows 10 (use search for background apps configuration)
  • Disable notifications in Windows 10 (use search for notifications configuration)
  • Disable scaling correction of Windows 10 (use search for scaling)
  • Disable autostart for all common game launchers (Steam, EA, ...)
  • Disable auto update in all common game launchers
@ryrun
ryrun / display_shortcut.md
Last active March 29, 2023 17:03
Open windows display settings as .lnk / shortcut

Use following to start moinitor settings in Windows 10 / 11:

C:\Windows\System32\rundll32.exe display.dll,ShowAdapterSettings 0