Skip to content

Instantly share code, notes, and snippets.

@rtldg
rtldg / quine120.c
Last active October 4, 2019 17:23
quine.c -- 78 characters (warnings) / 120 characters (no warnings)
#define s(a)char*B=#a;a
#include<stdio.h>
s(int main(){printf("#define s(a)char*B=#a;a\n#include<stdio.h>\ns(%s)", B);})
var twitterfile = 'Ezp2oHmXIAEEWpu'; // from https://twitter.com/NASA/status/1385550268348223491
var hexadecimal = '0x' + [...atob(twitterfile)].map(c=> c.charCodeAt(0).toString(16).padStart(2,0)).slice(0, 8).join('');
var date = new Date(Number(hexadecimal) / 2 ** 22 + 1288834974657);
export blah="$(grep client.so /proc/$(pidof hl2_linux)/maps | head -n 1 | cut -d - -f1)" ; export DDDD="$(printf "0x%X\n" $((0x$blah + 0x3c856f)))" ; export FFFD="$(printf "0x%X\n" $(($DDDD + 4)))" ; grep -a -insecure "/proc/$(pidof hl2_linux)/cmdline" && sudo gdb -p $(pidof hl2_linux) -ex "set {int}$DDDD = 0x90909090" -ex "set {short}$FFFD = 0x9090" -batch
@rtldg
rtldg / ljstats.sp
Last active January 18, 2023 00:15
#include <sourcemod>
#include <sdktools>
#include <clientprefs>
#include <sdkhooks>
#include <smlib>
#include <shavit>
#include <morecolors>
//#define DEBUG
//#define LJSERV
#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, 30
winTitle := "ahk_class Chrome_WidgetWin_1 ahk_exe Discord.exe"
Loop
{
#include <Windows.h>
#include <iostream>
#define NEW_SENS 1
int main()
{
std::cout << "Hello World!\n";
public void OnPluginStart()
{
FindConVar("sv_client_min_interp_ratio").FloatValue = 2.0;
FindConVar("sv_client_max_interp_ratio").FloatValue = 2.0;
}
import os
import pathlib
os.chdir('mpv11')
for filename in os.listdir('.'):
p = pathlib.Path(filename)
clean = p.stem.strip().rstrip('_.')
if clean != p.stem:
p.rename(clean + p.suffix)
@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"
#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"