Skip to content

Instantly share code, notes, and snippets.

View devdave's full-sized avatar
🌴
On vacation

devdave

🌴
On vacation
View GitHub Profile
@devdave
devdave / Linux-Meta-Quest.md
Created February 11, 2026 16:42 — forked from ctrueden/Linux-Meta-Quest.md
Linux + Meta Quest 3S

2025-04-27: The way I play VR games wirelessly on Linux e.g. from Steam is to use WiVRn (a fork of Monado) via the Envision orchestrator.

Here's the path I followed to get it working with my Meta Quest 3S:

  1. Download the appImage as linked from the Envision page of the Linux VR Adventures wiki.

  2. Launch Envision from the terminal (so that you can see its console messages). In the GUI at the bottom is a combo box. Select WiVRn as the desired system. Then at the top of the GUI is a button to configure and build it. You will likely need to apt install some prerequisites first. (2025-04-23) Envision wanted me to installed these packages for Lighthouse profile:

    sudo apt install libeigen3-dev glslang-tools glslc libbsd-dev libdrm-dev \
        libusb-1.0-0 libusb-1.0-0-dev libx11-xcb-dev libxcb-
@devdave
devdave / voiceattack.md
Created February 9, 2026 05:02 — forked from vsTerminus/voiceattack.md
VoiceAttack on Linux

Voice Attack on Linux

2025-06-23 - VoiceAttack 2.x

VoiceAttack 2 is a .NET 8 application, so you need the dotnetdesktop8 runtime when you create the prefix.

WINEPREFIX=/home/yourname/Games/DCS/Prefixes/voiceattack WINEDLLOVERRIDES=mscoree=d winetricks -q dotnetdesktop8
@devdave
devdave / README.md
Created July 22, 2025 05:35 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@devdave
devdave / cloudfront-response.d.ts
Created March 7, 2024 05:31
a part of the cloud front response code
export interface CloudFrontResponseEvent {
Records: Array<{
cf: CloudFrontEvent & {
readonly request: Pick<CloudFrontRequest, Exclude<keyof CloudFrontRequest, "body">>;
response: CloudFrontResponse;
};
}>;
}
@devdave
devdave / use-settings.ts
Created July 20, 2023 19:41
Experimental React settings state manager
import { map, Dictionary } from 'lodash'
import { UseMutationResult, UseQueryResult } from '@tanstack/react-query'
import { useCallback } from 'react'
type GenericTypes<TContainer> = TContainer[keyof TContainer]
export interface SettingsManagerReturn<TValues> {
get: <Field extends keyof TValues>(name: Field) => UseQueryResult<TValues[Field]> | undefined
set: <Field extends keyof TValues>(name: Field, value: TValues[Field]) => TValues[Field]
reconcile: (onValuesLoaded?: (values: TValues) => void) => void
@devdave
devdave / content_tree.tsx
Created June 12, 2023 18:23
Toggleable and hand onSelect with custom node.
import {TargetedElement} from "./types.ts";
import {FC} from "react";
import {Tree, NodeRendererProps} from "react-arborist";
type setElementsType = (elements: TargetedElement[]) => void;
interface ContentTreeProps {
elements: TargetedElement[],
setElements: setElementsType
@devdave
devdave / printout.py
Created April 7, 2023 16:14
print portal names for valheim
"""
1. Download & install Python, be sure to click option for it to be added to the system Path
2. Save this to Desktop or somewhere/anywhere
3. Find the file path to your valheim world db file.
4. Put the file path in between the quotes on line 23 / test_file
5. Using the command line, run `python printout.py`
"""
def portals(dbfile):
with open(dbfile, 'rb') as db:
@devdave
devdave / main.reds
Created March 8, 2023 14:58
Updated broken/cheat breach mini game for Cyberpunk 2077
//Breach protocol simplifier
//Copy to r6/scripts/breach/ make sure to create "breach" directory if it doesn't exist
// 1.6 compat
@replaceMethod(MinigameGenerationRuleScalingPrograms)
protected func OnProcessRule(out size: Uint32, out grid: array<array<GridCell>>) -> Bool {
let atStart: Bool;
let combinedPowerLevel: Float;
let extraDifficulty: Float;
let i: Int32;
@devdave
devdave / valheimdb_snippet.py
Created February 4, 2023 21:46
A short snippet to seek through a valheim db file and retrieve a lit of portals
# sourced from https://www.reddit.com/r/valheim/comments/lixlu7/any_way_to_look_up_the_name_of_a_portal_you_forgot/iibfmuo/
import mmap
def portals(dbfile):
db = open(dbfile, 'rb')
mm = mmap.mmap(db.fileno(), 0, prot=mmap.PROT_READ)
i, l = 0, set()
while True:
@devdave
devdave / contractions.py
Created December 1, 2022 21:44 — forked from nealrs/contractions.py
Expand common (and some very uncommon) english contractions
"""
this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python
all credits go to alko and arturomp @ stack overflow.
basically, it's a big find/replace.
"""
import re
cList = {
"ain't": "am not",