Skip to content

Instantly share code, notes, and snippets.

how many recursive CNAME records does your dns resolver resolve?
well there's an easy way and a hard way to figure out...
let's start with the hard way:
- search golang dns server
- end up with https://gist.github.com/walm/0d67b4fb2d5daf3edd4fad3e13b162cb and save main.go to a folder
- search how to build a golang project and download imports because you don't remember
- edit it to parse the deepest subdomain as an int and return a CNAME minus one of it
- and also return a real A record if the int is 0
- acquire a vps and scp your built binary to it
@rtldg
rtldg / purge.py
Last active January 13, 2025 23:19
purge old cloudflare pages deployments
# SPDX-License-Identifier: WTFPL
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "cloudflare==2.19",
# ]
# ///
# Create token with Account -- Cloudflare Pages:Edit, Workers Scripts:Edit
import glob
import urllib.request
import os
plain = ""
for f in glob.glob("*.bsp"):
plain += str(os.path.getsize(f)) + " " + f + "\n"
req = urllib.request.Request("https://check.fastdl.me/nsplain", data=plain.encode(), headers={"User-Agent": "check.py"})
resp = urllib.request.urlopen(req)
print(resp.read().decode('utf-8'))
@rtldg
rtldg / sqlite3bhoptimerweightedpoints.c
Created December 19, 2022 03:03
Test sqlite extension for bhoptimer's GetWeightedPoints
// SPDX-License-Identifier: CC0
/* vim: set ts=2 : */
/*
This is basically:
SELECT SUM(p2)
FROM (
SELECT (points * POW(?, ROW_NUMBER() OVER (ORDER BY points DESC) -1)) AS p2
FROM playertimes WHERE auth = ? ORDER BY points DESC LIMIT ?;
);
@rtldg
rtldg / mpv fucker.nip
Created November 18, 2022 04:27
nvidiaProfileInspector profile for mpv.exe so it stops being recorded by NVIDIA Instant Replay
<?xml version="1.0" encoding="utf-16"?>
<ArrayOfProfile>
<Profile>
<ProfileName>mpv fucker</ProfileName>
<Executeables>
<string>mpv.exe</string>
</Executeables>
<Settings>
<ProfileSetting>
<SettingNameInfo />
@rtldg
rtldg / things.md
Created October 9, 2022 11:59
useful source engine console things

cl_pdump

cl_soundscape_printdebuginfo

sv_soundemitter_trace 1

snd_dumpclientsounds

snd_show 1

// B = back
// F = front/forward
// D = down
// U = up
// L = left
// R = right
#define BDL 0
#define BUL 1
#define FDL 2
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
;SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetKeyDelay, 10
winTitle := "ahk_class UnityWndClass ahk_exe ShiningJumpJump.exe"
Loop
{
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#include <output_info_plugin>
#define PLUGIN_NAME "Show Triggers (Brushes) Redux"
#define PLUGIN_AUTHOR "JoinedSenses, edited by Blank"
@rtldg
rtldg / speedometer.sp
Last active May 25, 2022 04:23
i didn't create this, just posted for diff edits
#include <sourcemod>
#include <sdktools>
#include <clientprefs>
#include <shavit>
#pragma semicolon 1
#pragma newdecls required
#define PLUGIN_VERSION "1337"