Skip to content

Instantly share code, notes, and snippets.

@WhiteHusky
WhiteHusky / default.nix
Last active December 3, 2025 20:39
F-Chat Horizon, NixOS
{ pkgs ? import <nixpkgs> {} }:
pkgs.callPackage ./fchat-horizon.nix {}
@WhiteHusky
WhiteHusky / configuration.nix
Last active October 1, 2025 01:52
Private WireGuard VPN for home access
{ config, lib, pkgs, ... }:
{
# Opening ports to the public, permitting the tunnel to connect regardless.
networking.firewall = {
enable = true;
trustedInterfaces = [
"wg-home"
];
allowedUDPPorts = [
# https://docs.python.org/3/tutorial/classes.html
# Define a new class that inherits `pygame.sprite.Sprite`, thus giving it all
# the methods of `pygame.sprite.Sprite` to `Bird`. You can override these
# methods with your own implementation if needed
# https://www.pygame.org/docs/ref/sprite.html#pygame.sprite.Sprite
class Bird(pygame.sprite.Sprite):
# Use __init__, a special method that allows Bird to be constructed by
# simply doing `Bird(x, y)`
def __init__(self, x, y):
# Use `super()`` to allow changing `pygame.sprite.Sprite` to something

Oculus Rift S (or Others) x Vive Controllers with Vive Headset

These instructions are a condensed form of these following videos:

Also included is some useful information for exotic configurations, specifically those who rely on a BTFS volume for games (for Linux x Windows gaming,) and also an important fix to avoid SteamVR crashing at start.

Assumptions

@WhiteHusky
WhiteHusky / rotate_desktop.sh
Last active May 7, 2020 04:52 — forked from mildmojo/rotate_desktop.sh
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
@WhiteHusky
WhiteHusky / 05_software_component.lua
Last active March 7, 2020 13:50
GERTi Modem Emulation & Supporting Libs
--[[
Code by Carlen White
]]--
local component = require("component")
local computer = require("computer")
if not SOFT_COMPONENT_UNALTERED then
SOFT_COMPONENT_UNALTERED = {}
end
--[[
Code by Carlen White
]]--
--[[
Given a table and a stream to write to, a table is converted to binary
data that can be reversed to recreate the table.
Use case is where the goal is to transmit a table but low memory
systems make it impossible to seralize the response through typical
libaries. Or limits of the means to transmit cannot allow transmission of
define ConsoleMemAddr,8192;
define KeyboardMemAddr,10241;
define ConsoleClearAddr,2041;
define ConsoleCursorSpeedAddr,2043;
define ConsoleCursorSizeAddr,2044;
define ConsoleCursorLocAddr,2045;
define ConsoleCursorOnAddr,2046;
define KeyboardShiftAddr,0;
define KeyboardBufferAddr,1;
define ConsoleMaxLength,2020;
'use strict';
import logger from './class/logger.mjs';
setInterval(function(){
logger.silly(`Hello from ${process.pid}!`)
}, 1000);