Skip to content

Instantly share code, notes, and snippets.

@Theaninova
Theaninova / ts-fuck.d.ts
Created November 9, 2023 01:01
TSFuck - The Brainfuck interpreter written using TypeScript Types
// TSF***
type IncrementPointer = '>'
type DecrementPointer = '<'
type IncrementByte = '+'
type DecrementByte = '-'
type Output = '.'
type Input = ','
type LoopOpen = '['
type LoopClose = ']'
declare module 'glslCanvas' {
export type DefaultUniforms = 'u_mouse' | 'u_resolution' | 'u_time' | 'u_tex'
export interface TestResult {
wasValid: boolean
frag?: string
vert?: string
timeElapsedMs: number
}
@Theaninova
Theaninova / signal_diagram.tex
Created June 7, 2021 10:31
Signal Diagram LaTeX Macro
\begin{tikzpicture}
\newcounter{xi}
\addtocounter{xi}{1};
\foreach \x in {10,20,...,200}{
\ifodd\value{xi}
{}\else{\node[anchor=north,x=1cm/1.5] at (\value{xi},0pt) {$\x$};}\fi
\addtocounter{xi}{1};
}
\draw (0,0) -- (0,12);
@Theaninova
Theaninova / kvdiagram.tex
Created June 7, 2021 10:29
4x4 KV Diagram LaTeX Macro
\usepackage{tikz}
\usepackage{calc}
%%% KV Table Macro
%%% USAGE:
%%% \kvtable{/*function name; e.g. f(x)*/}
%%% {{ 0}{ 1}{ 5}{ 4}}
%%% {{ 2}{ 3}{ 7}{ 6}}
%%% {{10}{11}{15}{14}}
%%% {{ 8}{ 9}{13}{12}}
@Theaninova
Theaninova / CSGO_CrosshairOptionsParser.ts
Created October 21, 2020 13:23
CS:GO Crosshair options parser
enum CrosshairStyle {
// DEFAULT = 1, // unsupported
DYNAMIC_MOV_SHOT_1 = 2, // pretty much all the same
DYNAMIC_MOV_SHOT_2 = 3,
FULL_STATIC = 4,
SEMI_STATIC = 5
}
/**
* Does not support the new Style CS Crosshair, no one uses it anyways
@Theaninova
Theaninova / stepped_axis.py
Created October 9, 2020 10:26
Joystick Gremlin Stepped Axis-to-Button
# Inspired/Adapted from original WhiteMagic
# https://gist.github.com/WhiteMagic/ff636574b45a12480fd0bd6f1a92740e
import time
import gremlin
from gremlin.user_plugin import *
mode = ModeVariable("Mode", "The mode in which to use this mapping")
axis = PhysicalInputVariable(