Skip to content

Instantly share code, notes, and snippets.

View saul's full-sized avatar

Saul Rennison saul

View GitHub Profile
@saul
saul / cs2-cvarlist.md
Created March 25, 2023 09:18
Counter-Strike 2 (version 47/13858 9640) cvar list
Name Value Description
@panorama_dispatch_event (cmd) Dispatch the event defined by the argument string. No creating panel is specified.
@panorama_dump_symbols (cmd) <ESymbolType> Dump all of the symbols in the Panorama symbol table
@panorama_generate_layout_xsd (cmd) Generate the Layout XML Schema Definition for the current run-time (types are dependent on which game DLL is running).
@panorama_print_cache_status (cmd) Print internal panorama refcounts for every file
_record (cmd) Flags: norecord
Record a demo incrementally.
_resetgamestats (cmd) Flags: sv
Erases current game stats and writes out a blank stats file
addip (cmd) Add an IP address to the ban list.
addons (cmd) list current addon info.
@saul
saul / main.rs
Created March 19, 2022 10:19
Rust type equality example
use std::convert::identity;
struct Teq<T, U> {
to: fn(T) -> U,
from: fn(U) -> T,
}
impl<T> Teq<T, T> {
fn refl() -> Teq<T, T> {
Teq {
@saul
saul / portal2-cvarlist.md
Created March 7, 2021 18:32
Portal 2 cvar list
Name Default Flags Description
+alt1 cmd "cl"
+alt2 cmd "cl"
+attack cmd "cl"
+attack2 cmd "cl"
+back cmd "cl"
+break cmd "cl"
+camdistance cmd "cl"
+camin cmd "cl"
@saul
saul / CrosshairInfo.cs
Created October 29, 2020 19:01
CSGO crosshair share code decoder
using System;
using System.Linq;
using System.Numerics;
using System.Text.RegularExpressions;
namespace ShareCode
{
enum CrosshairStyle
{
Default,
Name Default Flags Description
+alt1 cmd "cl"
+alt2 cmd "cl"
+attack cmd "cl"
+attack2 cmd "cl"
+back cmd "cl"
+break cmd "cl"
+camdistance cmd "cl"
+camin cmd "cl"
@saul
saul / netprops.txt
Created May 3, 2017 20:54
CSGO Network Properties
This file has been truncated, but you can view the full file.
// Dump of all network properties for "csgo" as at 2016/08/23
//
CAI_BaseNPC (type DT_AI_BaseNPC)
Table: baseclass (offset 0) (type DT_BaseCombatCharacter)
Table: baseclass (offset 0) (type DT_BaseFlex)
Table: baseclass (offset 0) (type DT_BaseAnimatingOverlay)
Table: baseclass (offset 0) (type DT_BaseAnimating)
Table: baseclass (offset 0) (type DT_BaseEntity)
Table: AnimTimeMustBeFirst (offset 0) (type DT_AnimTimeMustBeFirst)
@saul
saul / textualise_number.py
Last active October 15, 2015 15:05
Textualise an integer to natural English language in Python
def slice_number(num, skip_places, num_places):
num //= 10**skip_places
return num - ((num // 10**num_places) * 10**num_places)
def textualise_number(num):
number_text = {
0: 'zero',
1: 'one',
2: 'two',
3: 'three',