Skip to content

Instantly share code, notes, and snippets.

@PeterTh
PeterTh / find_path.cpp
Last active February 15, 2025 14:55
Workaround for loading saves from other games on Steam Deck
// This is part of the function that finds the path for the previous games' saves for importing
// ideally you should also cache the result if this is required more than once
using namespace fs = std::filesystem;
std::string path = ph3lib::os::commonFolder(ph3lib::os::CommonFolder::SavedGames) + "/Falcom/Kuro/";
if (fs::exists(path)) {
return path;
}
// special handling for when running on the Steam Deck (or a Wine environment in general)
@VVispy
VVispy / LG TV Homebrew Guide.md
Last active April 11, 2025 04:38
LG TV Homebrew Guide

How to Install Third Party Apps on LG Brand TVs Logo

  • This is done using webOS dev manager + LG developer mode auto-renewal. Completely for free.
  • Homebrew allows users to install select extra apps that are not on the LG content store to their LG TV such as Ad-free YouTube (Sponsorblock included) and Kodi.
  • It's known to work on C and G series LG TVs. May work on others.
  • This will not void your warranty and will not break anything if done correctly.
  • This guide is pretty easy to follow, so don't be overwhelmed

Guide

@d7samurai
d7samurai / .readme.md
Last active October 3, 2024 15:29
Minimal D3D11 bonus material: extra minimal triangle

Minimal D3D11 bonus material: extra minimal triangle

A quick side exercise to see how little code one can get away with to put that RGB triangle on screen using D3D11 (without bending over backwards with trickery). This is a complete app in < 40 LOC (including the HLSL).

pretty minimal d3d11 triangle

For more.. elaborate.. D3D11 reference code, see the original Minimal D3D11, Minimal D3D11 pt2 and Minimal D3D11 pt3

@d7samurai
d7samurai / .readme.md
Last active March 12, 2025 06:00
Minimal D3D11 pt3

Minimal D3D11 part 3

An elaboration on Minimal D3D11 pt2, adding shadowmapping and incorporating various improvements and alternative approaches to the rendering setup, such as manual vertex fetching, samplerless texture lookup, null shader depth map rendering and procedurally generated texture and instance data.

As before, this is intended to be an an "API familiarizer" - an uncluttered Direct3D 11 setup & basic rendering reference implementation, in the form of a complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion. No modern C++ / OOP / obscuring cruft, only ~190 LOC. View on YouTube

minimald3d11pt3

@d7samurai
d7samurai / .readme.md
Last active March 16, 2025 13:58
Minimal D3D11 pt2

Minimal D3D11 part 2

Follow-up to Minimal D3D11, adding instanced rendering. As before: An uncluttered Direct3D 11 setup & basic rendering primer / API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion. No modern C++ / OOP / obscuring cruft.

The main difference here is that the hollow cube is rendered using DrawIndexedInstanced (which saves a lot of vertices compared to the original, so model data is now small enough to be included in the source without being too much in the way), but also all trigonometry and matrix math is moved to the vertex shader, further simplifying the main code.

Each instance is merely this piece of geometry, consisting of 4 triangles:

instanced1

..which is

@Log1x
Log1x / debloatNox.md
Last active March 26, 2025 01:44
Debloating & Optimizing Nox

Debloating Nox

Nox, despite being the most feature-filled Android emulator, has a lot of negativity surrounding it due to their antics when it comes to making income off of their program. It is known for running repeated advertisments in the background, calling home and passing along system information (outside of your Android instance) as well as a vast amount of potentially sensitive data in an encrypted payload back to their multitude of servers. With the following preventitive measures, we can stop a majority of this happening as well as greatly improve the overall performance.

  1. Download and Install a fresh copy of Nox. The latest version is fine (for now). If you already have it installed, that is fine too. No need to reinstall.

  2. Enable Root Mode on Nox by clicking the gear icon and then checking the Root Startup box.

  3. Install a new Launcher from the Play Store. ANYTHING but Nox's default. I suggest [Nova Launcher](https://play.google.com/s

@d7samurai
d7samurai / .readme.md
Last active March 19, 2025 22:39
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube

hollowcube

Other gists in this series: