Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/jquery-1.9.1.min.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/isRockFx.js"></script>
<script>
$(function () {
@hearnadam
hearnadam / Derive.scala
Created March 29, 2025 03:15
Scala 3 Type Masking
object Derive:
import scala.quoted.*
inline def derive[Contents, Mask]: NotIn[Contents, Mask] =
${ deriveImpl[Contents, Mask] }
private def deriveImpl[Contents: Type, Mask: Type](using q: Quotes): Expr[NotIn[Contents, Mask]] = {
import quotes.reflect.*
if (inMask[Contents, Mask]) {
report.errorAndAbort(s"Type ${Type.show[Contents]} is in Mask: ${Type.show[Mask]}")
} else {
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/jquery-1.9.1.min.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/isRockFx.js"></script>
<script>
$(function () {

Instructions for YouTube:

There is a small chance your account could be banned. DO NOT login with an important Google account (such as an account you use for Gmail)

If yt-dlp is asking you to log in, first try running --update-to nightly to see whether it fixes the issue!

Export cookies automatically (this works on MacOS and Linux, but it only works on Windows if you use Firefox):

  1. Log into YouTube in your browser
@PadowYT2
PadowYT2 / pterodactyl.md
Created October 16, 2026 15:54
Pterodactyl drama

Tip

TL;DR: Switch from Pterodactyl v2 by: staying on v1; switching to e.g. Calagopus.

I am a Pterodactyl user, using it since August 2021, and learning the basics of Linux, like simple commands, just because of selfhosting it. Since then, I have appeared on Vertisan - the creators of famously known Unix Theme (now dethroned by many).

Important

Why should I care about what you said in the gist?

You shouldn't. I'm a normal person, just like you. Do whatever you want, this is my stance.

@christophewang
christophewang / QuickSort.cpp
Last active October 16, 2026 19:57
Quick Sort in C++
#include <iostream>
void printArray(int *array, int n)
{
for (int i = 0; i < n; ++i)
std::cout << array[i] << std::endl;
}
void quickSort(int *array, int low, int high)
{
@jkdavew
jkdavew / find_it.sql
Last active October 16, 2026 19:49
Locate DB2 functions, procedures, tables, views by query term
-- Subject: Locate DB2 functions, procedures, tables, views by query term
-- Author: Dave Weissman
-- Platform: IBM i (tested on V7R5)
-- Date : June, 2024
--
stop;
CREATE OR REPLACE PROCEDURE find_it (p_query VARCHAR(2048), --terms to search for
p_libl VARCHAR(2048) DEFAULT 'SYSTOOLS,QSYS,QSYS2', --default library list
p_omit_table BOOLEAN DEFAULT false, --skip table lookup
@sargunv
sargunv / empty-json-schema.json
Created December 5, 2022 18:44
empty json schema
{}
@glauroqj
glauroqj / trava_zap_infinito.js
Last active October 16, 2026 19:45
Trava Zap Infinito
/*
Credits to original content: https://github.com/Matt-Fontes/SendScriptWhatsApp/blob/main/shrekSendScript.js
*/
let repeatTimes = 10;
let internalCount = 0;
const script = `
SHREK
Written by

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.