Skip to content

Instantly share code, notes, and snippets.

@garrett361
garrett361 / derivation.md
Last active December 21, 2025 20:51
Sonic MoE Backwards Math

Writing out the math used in Sonic MoE: https://arxiv.org/abs/2512.14080. Sec. 3.2 and Appendix C.

Setup

Goal: compute the backwards pass without needing to cache large tensors which would blow up with increased sparsification.

Tensors:

  • X_{ted}: input tensors
  • W^1_{edn}: up projection
@Redblockmasteur
Redblockmasteur / WindowGuard_Climate_Control.yaml
Last active December 21, 2025 20:50
WindowGuard Climate Control
blueprint:
name: WindowGuard Climate Control
description: This blueprint intelligently manages your heating or cooling systems based on window sensor activity, conserving energy by suspending climate control when a window is open and restoring settings after user-defined delays for opening and closing the window.
domain: automation
input:
window_sensor:
name: Window Sensor
description: Select the sensor that monitors your windows. Useful for controlling heating or cooling based on window status.
selector:
entity:
@RexYuan
RexYuan / strix-compare.md
Last active December 21, 2025 20:44
True-to-scale dimension comparison chart of every AMD Strix Halo Al Max+ 395 MiniPC

  1. M4 Mac Mini and Dell Optiplex(Project TinyMiniMicro) for scale reference.
  2. Bosgame, Peladn, and XPlus use the exact same case just with different branding.
  3. NIMO, Linglong, Colorful, and LCFC use the exact same SIXUNITED stock case.
  4. GMKtec, FEVM FA-EX9, Bosgame, Peladn, XPlus, NIMO, Linglong, Colorful, and LCFC all use same SIXUNITED AXB35 motherboard.

Here are the exact dimensions placed horizontally measured in mm:

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

#!/usr/bin/python
import binascii
import hashlib
import hmac
import sys
def GetHash(GameID):
byte_key = binascii.unhexlify('AD62E37F905E06BC19593142281C112CEC0E7EC3E97EFDCAEFCDBAAFA6378D84')
hash = hmac.new(byte_key, 'np_%s' % GameID, digestmod=hashlib.sha256)
@hadisfr
hadisfr / outline-server-setup.md
Last active December 21, 2025 20:37 — forked from okeehou/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server and use Outline Manager.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

@mogzol
mogzol / Create a bootable USB for Lenovo Yoga Slim 7X.md
Last active December 21, 2025 20:36
Create a bootable USB for Lenovo Yoga Slim 7X

Create a bootable USB for Lenovo Yoga Slim 7X

I originally wrote this as a Reddit comment, but it was deleted (I guess because it has links? idk), so I'm creating this Gist instead to document how I was able to boot the Windows installer on this laptop.

Note that the easiest solution is to just download the recovery media creator from Lenovo's support site, but I wanted to run the stock Windows installer, so this outlines how to do that.


Here are the steps I took to boot the Windows installer on my Lenovo Yoga Slim 7X (with an ARM64 Snapdragon Elite X CPU). I initially tried using Rufus, and while that drive did show up in the boot menu, selecting it would just hang on the YOGA logo forever.

@vondraussen
vondraussen / ssh_https_tunnel.md
Last active December 21, 2025 20:23
SSH through HTTPS tunnel via Openssl and Traefik

How to setup ssh through https tunnel

... via OpenSSL and Traefik

A HTTPS tunnel for SSH (Secure Shell) is a useful tool for accessing a remote server in a secure manner when the connection is limited or restricted by a firewall or network security measures. It provides a secure way to bypass these restrictions and access the remote server securely over the internet. The HTTPS protocol, which is used to secure web traffic, is utilized to create a secure connection to the remote server. The data transmitted over this connection is

@maitrungduc1410
maitrungduc1410 / create-vod-hls-gpu.sh
Last active December 21, 2025 20:22
Bash scripts to create VOD HLS stream with ffmpeg using GPU
#!/usr/bin/env bash
START_TIME=$SECONDS
set -e
echo "-----START GENERATING HLS STREAM-----"
# Usage create-vod-hls-gpu.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
renditions=(

Since the original creator aamiaa does not want new features or improvements added to their code, I created this gist with some quality-of-life improvements instead.

My version still fully respects the Discord API and does not bypass or abuse it.


Patch Notes

Patch 0.0