Skip to content

Instantly share code, notes, and snippets.

@safijari
safijari / readme.org
Last active May 20, 2024 01:06
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
@abmantis
abmantis / m5stack-atom-matrix-esphome.yaml
Created July 4, 2023 21:06
M5Stack Atom Matrix ESPHome
esphome:
name: m5-atom-matrix
platformio_options:
upload_speed: 115200
on_boot:
priority: 700
then:
- output.turn_on: wifi_fix_output
esp32:
@Linch1
Linch1 / tokenPriceApi.js
Last active July 26, 2024 02:01
Retrive the price of any bsc token from it's address without using external service like poocoin/dextools
let pancakeSwapAbi = [
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},
];
let tokenAbi = [
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},
];
const Web3 = require('web3');
/*
Required Node.js
@qcasey
qcasey / README.md
Last active July 25, 2024 13:38 — forked from mill1000/README.md
Headless A2DP Audio Streaming on Ubuntu / Debian for non-raspbian SBCs (ODROID, Orange Pi, Armbian, etc)

About

This gist will show how to setup a generic SBC Debian / Ubuntu install as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

This is forked from another gist specific to the Raspberry Pi on Stretch. A required package isn't in Ubuntu's repos, so in this gist we build it from scratch.

Tested to be working on Armbian/Ubuntu/Debian images of the Orange Pi Zero, ODROID XU4, ODROID N2, and Atomic Pi.

Prerequisites

@aveao
aveao / amsemummc.md
Last active March 12, 2020 15:45
setting up ams partition based emummc on linux

Setting up emummc in a nutshell (mostly for linux)

  • update atmosphere to 0.9.2 on your microsd. Also ensure that your microSD is MBR, not GPT (gparted calls this msdos).
  • if you want to use an old backup, grab those files, you'll need them. If not, boot into hekate, dump raw gpp and boot0/1.
  • combine all files on your pc, in the order of boot0, boot1 and rawnand (cat BOOT0 BOOT1 rawnand.bin.00 rawnand.bin.01 rawnand.bin.02 rawnand.bin.03 rawnand.bin.04 rawnand.bin.05 rawnand.bin.06 rawnand.bin.07 rawnand.bin.08 rawnand.bin.09 rawnand.bin.10 rawnand.bin.11 rawnand.bin.12 rawnand.bin.13 rawnand.bin.14 > emummc.bin). Resulting file should be 31276924928 bytes unless you modded your console with a larger (or a smaller) emmc (if you don't know what this is about, then you haven't modded yours).
  • create a fat32 partition on your microsd of the same size as the resulting file you just created (can be a bit bigger, do it a bit [100MiB or so] bigger if you want to be safe), dd the combined file to it with
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active July 23, 2024 03:17
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@flatz
flatz / remote_pkg_installer.txt
Last active January 30, 2024 04:21
Instructions for Remote Package Installer
Remote Package Installer
Package link: https://mega.nz/#!2dN1XajB!Z5fXyFoKOXFI_ujgGoCZfFFy5nyn7OWo6vF6h_HmWhQ
Requirements:
Any exploit on 4.5x+
HEN 1.8 (you could get it from zecoxao's page) or any other kernel payload (it just need to have fPKG stuff and /data mount patches for ShellCore that I've posted recently)
Changelog:
[+] Added CORS header to interact with browser's AJAX
@shenghaoyang
shenghaoyang / blueEnable_ALARM_non_mainline.md
Last active February 19, 2024 00:14
Bluetooth support on Raspberry Pis running Arch Linux ARM with non-mainline kernel.

#1 Update: Recent Rapsberry Pi (downstream) kernel dt-overlays now exposes a config option "krnbt" that negates the need for all this.

Relevant PRs: raspberrypi/linux#3682

Enabling bluetooth

[Pi 3B (Non-Plus) / Pi Zero W ONLY]

As of kernel package, linux-raspberrypi-4.14.59-1, support for notifying the kernel of the

@Brainiarc7
Brainiarc7 / ffmpeg-vp8&9-encode-test-vaapi-intel.md
Last active December 31, 2023 02:19
PSA: You can now use FFmpeg's VAAPI-based VP8 and VP9 encoder on Skylake+ systems on Linux: Tested on Ubuntu 16.04LTS

Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:

Build platform: Ubuntu 16.04LTS.

First things first:

Install baseline dependencies first

sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools