Skip to content

Instantly share code, notes, and snippets.

@Ircama
Ircama / LgMagicRemoteKeys.md
Last active December 21, 2025 12:30
Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

This procedure allows substituting one or both Netflix and Amazon keys of the Magic Remote Control Unit with other apps or TV control menus of the webOS LG TV.

Netflix and Amazon keys can be found just over the Red-Green-Yellow-Blue color buttons of such remote.

Assumption for this procedure is that you accept to uninstall the apps related to the keys to be substituted. Example: if you want to replace the Netflix key, you need to uninstall Netflix (possibly, you are not using Netflix if you do not need such key).

To uninstall Netflix or Amazon Prime, press the Home key of the Magic Remote, select the "LG Content Store" app, press "APP" at the top of the screen, press "My Apps", press the "Rem

@Flunzmas
Flunzmas / calc_2_wasserstein_dist.py
Last active December 21, 2025 12:24
Differentiable 2-Wasserstein Distance in PyTorch
import math
import torch
import torch.linalg as linalg
def calculate_2_wasserstein_dist(X, Y):
'''
Calulates the two components of the 2-Wasserstein metric:
The general formula is given by: d(P_X, P_Y) = min_{X, Y} E[|X-Y|^2]
For multivariate gaussian distributed inputs z_X ~ MN(mu_X, cov_X) and z_Y ~ MN(mu_Y, cov_Y),
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 21, 2025 12:22
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@RackofLambda
RackofLambda / PRIME_FACTORIZATION.txt
Last active December 21, 2025 12:20
A collection of Microsoft Excel LAMBDA functions related to Prime Factorization.
/* List of LAMBDA functions in this collection:
--------------------------------------------
ISPRIME -------->> Determines if a number is prime.
FACTORS -------->> Returns all factors of a number.
PF ------------->> (recursive) Returns the prime factorization of a number.
PF_LCM --------->> Returns the least common multiple of integers. Extends the native LCM return limits from 2^53 to 10^308.
*/
/* FUNCTION NAME: ISPRIME
@RackofLambda
RackofLambda / ARRAY_TRANSFORMATIONS.txt
Last active December 21, 2025 12:19
A collection of Microsoft Excel LAMBDA functions for transforming tables and arrays.
/* List of LAMBDA functions in this collection:
--------------------------------------------
CALENDARRAY ---->> Generates a monthly calendar for the specified number of months.
CROSSJOIN ------>> Returns the Cartesian product of two tables or arrays.
CROSSJOINM ----->> Returns the Cartesian product of multiple arrays.
KRON ----------->> Returns the Kronecker product of two arrays.
PERMA ---------->> Returns all permutations or combinations, with or without repetitions, for a given number of items.
REPTA ---------->> Repeats a range or array vertically or horizontally a specified number of times.
REPTROWS ------->> Repeats each row in a range or array a specified number of times.
REPTCOLS ------->> Repeats each column in a range or array a specified number of times.
@RackofLambda
RackofLambda / DYNAMIC_ARRAY_HELPER_FUNCTIONS.txt
Last active December 21, 2025 12:19
A collection of Microsoft Excel LAMBDA functions for scanning tables and arrays.
/* List of LAMBDA functions in this collection:
--------------------------------------------
LISTBY --------->> Groups all values from a table or array by distinct item and returns a jagged array of associated lists.
INSTANCENUM ---->> Returns the running count of distinct items in an unordered table or array.
RUNNINGTOT ----->> Returns the running total of values by distinct item in an unordered table or array.
RUNNINGTOT2 ---->> Returns the running total of values by distinct item in an unordered table or array, with the option to prioritize order by date.
JOINROWS ------->> Creates a key identifier row by combining the values of each row in an array on a column-by-column basis.
JOINCOLS ------->> Creates a key identifier field by combining the values of each column in an array on a row-by-row basis.
SCANBYROW ------>> Scans an array in row-major order by applying a LAMBDA to each value and returns an array of intermediate results for each row.
SCANBYCOL ------>>
@yorickdowne
yorickdowne / friday.md
Last active December 21, 2025 12:14
Debian 13 trixie upgrade

Debian 13

Caution Upgrading from Debian 12 to Debian 13 on machines with mdadm has intermittently failed for me; symptom is that grub EFI is not up to date and system boots into BIOS. Root cause under investigation; it might not be related to mdadm.

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 13 "trixie" from Debian 12 "bookworm" can be helpful. 3rd-party repos are handled with a find command.

Note upgrade is only supported from Debian 12 to Debian 13. If you are on Debian 11, upgrade to Debian 12 first. Then once on Debian 12, you can upgrade to Debian 13.

@7etsuo
7etsuo / tetsuo_curl.c
Created December 20, 2025 21:06
tetsuo_curl.c
// clang-format off
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2025 Tetsuo AI
*
* tetsuo_curl.c - A minimal curl-like HTTP client using the Simple API
*
* Demonstrates how little code is needed for a functional HTTP client.
* Redirects are followed automatically (up to 10 hops).
*
@lseongjoo
lseongjoo / vhd4wsl2.md
Created October 1, 2023 05:09 — forked from spajak/vhd4wsl2.md
Creating virtual hard disk (VHD) for WSL2

Creating additional virtual hard disk (VHDX) for WSL2 with ext4 filesystem

Lines starting with # mean the commands have to be executed by root user under Linux shell (WSL distro). All other commands have to be executed under Windows-PowerShell as Administrator.

Make VHDX disk file and mount it under Windows

New-VHD support.vhdx -SizeBytes 25GB -Dynamic -BlockSizeBytes 1MB
Write-Output "\\.\PhysicalDrive$((Mount-VHD -Path support.vhdx -PassThru | Get-Disk).Number)"
@sundowndev
sundowndev / GoogleDorking.md
Last active December 21, 2025 11:59
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"