Skip to content

Instantly share code, notes, and snippets.

View jfroy's full-sized avatar

Jean-François Roy jfroy

View GitHub Profile
@thubble
thubble / chromium-support-disjoint-vaapi-export-import.patch
Last active February 18, 2024 21:28
Patch to allow Chromium zero-copy VaapiVideoDecoder to work when va-api exports dma-buf planes as disjoint, such as with AMD Mesa
--- a/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc
+++ b/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc
@@ -257,7 +257,7 @@
return false;
}
-#if BUILDFLAG(IS_LINUX)
+#if 0
if (format.IsLegacyMultiplanar()) {
// ExternalVkImageBacking doesn't work properly with external sampler
@usrbinkat
usrbinkat / README.md
Last active May 12, 2025 16:25
Home K8s Native FW / Router

Kubernetes Single Node Edge Firewall, Gateway, and Ubiquiti AP Controller

This is a rought draft document describing the build of VyOS on microk8s for use as a home WAN firewall/router. I also use an Ubiquiti UAP Pro Access Point to broadcast my home wifi networks.

Here is a visual of the silent fanless intel i7 kubernetes node, access point, and power-over-ethernet adapter. kill-a-watt

This is a slightly over estimated annual power cost estimate for powering the whole setup. Est Annual Cost

README

After the 1948278201th time of having to apply this patch manually after a CSGO update I decided it's time for a script. In essense this script will:

  1. Detect the distribution
  2. Install the respective libtcmalloc via the disto's package manager.
  3. Search the lib paths to find the location of libtcmalloc_minimal.so.4
  4. Copy it into the GAMEROOT/bin/linux64 path.
#!/usr/bin/env python
import json
import subprocess
import os
import sys
def resolve_depset_to_paths(artifacts, path_fragments, depset):
all_inputs = []
for artifact_id in depset["directArtifactIds"]:
@mikestecker
mikestecker / optimising-unifi-performance.md
Last active February 19, 2025 20:54
optimising-unifi-performance

optimising-unifi-performance

NOTE: Content below is written by Adrian Mace. Click here for an updated version.

Below are the key settings that I apply on any unifi installation for optimal performance.

Settings

Settings > Site

  • Ensure Enable Advanced Features is enabled
    This allows you to follow along with the guide in it's entirety.
@TheRealMJP
TheRealMJP / Tex2DCatmullRom.hlsl
Last active June 7, 2025 22:02
An HLSL function for sampling a 2D texture with Catmull-Rom filtering, using 9 texture samples instead of 16
// The following code is licensed under the MIT license: https://gist.github.com/TheRealMJP/bc503b0b87b643d3505d41eab8b332ae
// Samples a texture with Catmull-Rom filtering, using 9 texture fetches instead of 16.
// See http://vec3.ca/bicubic-filtering-in-fewer-taps/ for more details
float4 SampleTextureCatmullRom(in Texture2D<float4> tex, in SamplerState linearSampler, in float2 uv, in float2 texSize)
{
// We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding
// down the sample location to get the exact center of our "starting" texel. The starting texel will be at
// location [1, 1] in the grid, where [0, 0] is the top left corner.
float2 samplePos = uv * texSize;
@maxtruxa
maxtruxa / Antonyms.md
Last active April 1, 2025 08:34
A list of common terms used in programming and their respective antonyms.

Antonym List

Note: The table headings (positive/negative) are not necessarily meaningful.

Positive Negative
acquire release
add remove (e.g. an item), subtract (arithmetic)
advance retreat
allocate deallocate (correct), free (common)
allow deny