Skip to content

Instantly share code, notes, and snippets.

View sugoidogo's full-sized avatar

SugoiDogo sugoidogo

View GitHub Profile
<body>
<button id="authTwitch" hidden>Login to Twitch</button>
</body>
<script type="module">
const client_id='id'
const client_secret='secret'
const redirect_uri=new URL('auth.html',location).toString()
const authTwitchButton=document.querySelector('button#authTwitch')
authTwitchButton.onclick=()=>window.open(redirect_uri)
@sugoidogo
sugoidogo / border.css
Last active December 2, 2023 14:18
Round image borders for fujitech reactive. Simply paste this text into the css box in the browser source properties in OBS
.h-screen {
border-radius: 25%;
height: auto;
}
.flex { height: 100vh; }
@sugoidogo
sugoidogo / audiorelay.service
Last active October 8, 2023 08:12
Audio Relay Daemon for Steam Deck
[Unit]
Description=AudioRelay Daemon
Documentation=https://audiorelay.net
Requires=pipewire.service
After=pipewire.service
[Service]
Type=exec
Environment=DISPLAY=:0
ExecStartPre=pactl load-module module-null-sink sink_name=AudioRelay sink_properties=device.description="AudioRelay"
@sugoidogo
sugoidogo / kdeconnectd-offscreen.service
Created August 4, 2023 11:00
KDE Connect background service for steam deck
[Unit]
Description=KDE Connect Background Service
[Service]
User=1000
Environment=XDG_RUNTIME_DIR=/run/user/1000
Type=exec
ExecStart=dbus-launch /usr/lib/kdeconnectd -platform offscreen
BusName=org.kde.kdeconnect
@sugoidogo
sugoidogo / gamepadui.sh
Last active June 16, 2023 13:51
Start a gamescope gamepadui session within an existing desktop environment
#!/bin/bash
set -xeuo pipefail
if pgrep steam; then steam -shutdown; fi
while pgrep steam; do sleep 1; done
for pid in $(pgrep -x gamescope); do kill $pid; done
: "${WRAPPER_CMD:=systemd-run}"
: "${WRAPPER_ARGS:=--user --pty --pipe}"
: "${GAMESCOPE_CMD:=gamescope}"

GameInput PC Crashing

Solution using IFODE

In 2017 I wrote a program to take advantage of Windows Image Execution Options, which allows you to start a debugger whenever a program is launched. I never finished that program, but it got far enough that you can use it to prevent a program from ever running. You can download it from here. Windows and chrome may prevent you from downloading or running this program, but you can ignore their warnings and hit the download or run anyways options they have hidden in submenus. This program has to be run from command line in an admin prompt. The easiest way to get there on windows 10+ is to right-click your start menu and select "Windows Powershell (Administrator)". Then put in the following commands:

> cd $HOME/Downloads
> ./ifeode.exe -o gameinputsvc.exe -n C:\windows\system32\systray.exe

If there's no output from the command, it worked! GameInput should never bother you again

@sugoidogo
sugoidogo / rfs.md
Last active November 7, 2022 06:10

Reversible File System

The following details a high-level concept of a filesystem feature which can reverse destructive operations.

Requirements

For sane implementation of the RFS concept, the host must support the following features:

  • Copy On Write

Package Manager File System

This document details a high-level concept of a filesystem feature that enables the rollback of a package installation by the filesystem itself, without the help of a package manager or uninstall script or program.

Prerequisites

For sane implementation of the pmfs concept, the host must support the following features:

  • volumes (btrfs "subvolumes", zfs "filesystem datasets", lvm "logical volumes")
  • snapshots
  • overlay mounts For sane resource usage, each additional instance of the above features must not consume any host resources other than the filesystem's allocated block device, which must be deduplicated for sane block usage.

Layers

A layer is a filesystem volume containing all the filesystem data resulting from the installation of a single package.

@sugoidogo
sugoidogo / obs-script.py
Last active October 1, 2022 23:04
template for obs python scripting
# https://obsproject.com/wiki/Getting-Started-With-OBS-Scripting
import obspython, json
def script_defaults(settings):
pass # https://obsproject.com/docs/reference-settings.html#default-value-functions
def script_description():
return "description" # https://doc.qt.io/qt-5/richtext-html-subset.html
def script_load(settings):
@sugoidogo
sugoidogo / pacman-steamos3.conf
Created July 6, 2022 06:31
official steam pacman repos used by the steam deck
[jupiter]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch
[holo]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch
[core]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch
[extra]