Skip to content

Instantly share code, notes, and snippets.

View John-Paul-R's full-sized avatar

John Paul R John-Paul-R

View GitHub Profile

Turn off your monitor in Hyprland when streaming with Sunshine (without an HDMI Dummy Plug)

I often use Sunshine to stream my PC games to my Android phone using Moonlight, but one thing that always bothered me is that I cannot turn my monitor off while streaming or else no video would be sent to Moonlight.

To solve this I would need to:

  1. Use an HDMI Dummy Plug to get a fake monitor
  2. Move video content from the real monitor to the fake monitor
  3. Stream the fake monitor
  4. Turn off the real monitor
@Patbox
Patbox / cardboard-not-so-great.md
Last active September 6, 2025 23:35
Why you shouldn't use cardboard, banner or any other "hybrid" server

By looking that you are here you most likely use Cardboard/Banner/some other weird bukkit + Fabric project (or just someone linked to it).

Don't do it, it will cause more harm/instabilities to your server than good. But let's start at the beginning.

Few definitions before we start:

  • Bukkit - It means bukkit, spigot, paper and any forks of these,
  • Cardboard - mod by IsaiahPatton that tries to port bukkit ecosystem to fabric.
  • Banner - another mod trying to make plugins work with Fabric, similar to Cardboard.
  • Fabric - a Minecraft modding platform, includes Fabric Loader and Fabric API, everything written in this gist also applies to Quilt.
  • Mods - Mods designed for fabric and compatible platforms
@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active August 5, 2025 13:20
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active September 26, 2025 13:26
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

@John-Paul-R
John-Paul-R / FabricModList.md
Last active October 15, 2025 12:28
A list of (almost all) mods for Fabric

Fabric Mod List

This page contains a list of the current Minecraft Fabric mods. (As of 2021-08-19 08:05:23 Timezone: UTC+0000 (GMT))

To search for mods by name, category, or download count, visit the website, fibermc.com!

Note: You can view a mod's source files by following the "Source" link on its CurseForge page, assuming that the mod's creator has made such files public.

There are currently 2954 mods in this list.

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active October 19, 2025 11:19
set -e, -u, -o, -x pipefail explanation
@scottoffen
scottoffen / clipboard-example.html
Last active March 19, 2025 13:15
JavaScript Copy To Clipboard Example
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Copy To Clipboard Example</title>
</head>
<body>
<input id="txtToCopy" type="text">
<button id="btnCopy">Copy!</button>
@jboner
jboner / latency.txt
Last active October 19, 2025 15:29
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@markphilpot
markphilpot / remove_empty_commits.sh
Last active February 3, 2025 12:33
git :: remove empty commits
git filter-branch --commit-filter 'git_commit_non_empty_tree "$@"' -f HEAD
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune