Skip to content

Instantly share code, notes, and snippets.

@steelbrain
steelbrain / readme.org
Created October 29, 2024 19:01 — forked from safijari/readme.org
How to use Orange Pi 5B for 4k 120hz (non HDR) streaming with Moonlight

IMPORTANT: DON’T USE THIS GUIDE AS IS. GNOME HAS A WEIRD VSYNC ISSUES. Instead you can use the official Debian image and make sure all the updated drivers are installed and the rest should remain the same.

Preamble

This guide is made using the Orange Pi 5B 4GB+32GB. The device is capable of handling a 4k 120hz stream but you should know that the decode time for 4k stream hovers around 8ms and can spike up to 15ms during a benchmark. I can’t feel any added latency from it and I don’t have any dropped frames. The decode time goes down to 4ms for 1440p. It’s certainly not the blazing fast sub ms decode latency we get on the Steam Deck or mini PCs. I bought the device for $99 and for that price I think this performance is fantastic, but your mileage/expecations may vary.

How to get this result (or rather how I got it)

  1. Install the official Gnome Ubuntu Jammy image using Balena Etcher onto a 16+ GB microSD card
@steelbrain
steelbrain / README.md
Created August 13, 2024 01:12
Bookmarks
@steelbrain
steelbrain / generate-types.ts
Created June 22, 2023 14:22
Generate static types from a Typescript type for use in sibling projects
import childProcess from 'child_process'
import fs from 'fs'
import path from 'path'
import ts from 'typescript'
import { fileURLToPath } from 'url'
const PATH_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
const PATH_TYPES_SOURCE = path.join(PATH_ROOT, 'src', 'types.ts')
const PATH_TYPES_OUTPUT = path.join(PATH_ROOT, 'src', 'types.output.d.ts')
@steelbrain
steelbrain / README.md
Last active August 14, 2020 05:07
OLED Brightness Daemon

OLED Brightness Daemon

I'm using this for my Razer Blade 17 Pro 2020 to keep the brightness slider in Ubuntu GNOME up to date with the actual brightness of the display.

It's not pretty but it works. Remember to add this to your startup (gnome-session-properties).

License

Licensed under MIT. Use however.

@steelbrain
steelbrain / index.js
Created August 24, 2018 13:10
iTerm2 Color Profile Printer
// Usage: node index.js
// Requires: npm install rgb-hex xml2json
// Requires color profile to be placed as Profile.itermcolors
// in same directory
const fs = require('fs')
const path = require('path')
const rgbHex = require('rgb-hex')
const { toJson } = require('xml2json')
@steelbrain
steelbrain / git-post-pr.sh
Created August 16, 2017 20:55
git-post-pr
#!/bin/bash
# Usage:
# git-post-pr
# Description:
# Deletes local branch (doesn't force so you won't lose local if not pushed remotely)
# Fetches remote so local remote branch is deleted
# Switches to master
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"