Skip to content

Instantly share code, notes, and snippets.

@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
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
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);
@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);})