Skip to content

Instantly share code, notes, and snippets.

View thacuber2a03's full-sized avatar
🧊
cube

ThaCuber thacuber2a03

🧊
cube
View GitHub Profile
#!/bin/env lua
local function trim(s)
local l = 1
while s:sub(l, l):find "%s" do
l = l + 1
end
local r = #s
while s:sub(r, r):find "%s" do
r = r - 1
// an excruciatingly overcomplicated calculator with memory written in Wren
// (made for learning how to do typechecking)
// run with the Wren CLI
// https://wren.io/cli
////////////////////////////////////////////////////////////////////
class Token {
construct new(type, lexeme, line) {
_type = type
@thacuber2a03
thacuber2a03 / readme.txt
Created December 4, 2024 14:37
mirror test (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@thacuber2a03
thacuber2a03 / readme.txt
Created December 4, 2024 14:01
wallcat (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@thacuber2a03
thacuber2a03 / readme.txt
Created December 4, 2024 13:25
wallcat (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@thacuber2a03
thacuber2a03 / readme.txt
Created December 2, 2024 13:41
longcat (Puzzlescript Plus Script)
Play this game by pasting the script in https://auroriax.github.io/PuzzleScript/editor.html
@thacuber2a03
thacuber2a03 / readme.txt
Created December 2, 2024 01:00
longcat (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@thacuber2a03
thacuber2a03 / kak-windows.md
Last active December 20, 2024 22:46
notes on running kakoune on windows

cygwin

  • get make, and gcc-c++ or clang
  • clone repo with core.autocrlf set to false:
    • git: git clone -c core.autocrlf=false https://github.com/mawww/kakoune
    • gh: gh repo clone mawww/kakoune -- -c core.autocrlf=false
  • if you forget to set core.autocrlf then get dos2unix and run it on all files in share/kak:
    find /path/to/share/kak/ -type f -exec dos2unix {} \;
@thacuber2a03
thacuber2a03 / canvas.lua
Last active November 10, 2024 18:14
a Love2D 11.x simple wrapper library for rendering games with a fixed update rate and chunky pixels
local floor = math.floor
local canvas = {}
canvas._version = "0.1.0"
canvas.frame, canvas.time = 0, 0
canvas.width = 240
canvas.height = floor(canvas.width / (16 / 9))
canvas.pixelPerfect = true
canvas.backgroundColor = { 0, 0, 0, 1 }
canvas.xOffset, canvas.yOffset = 0, 0
@thacuber2a03
thacuber2a03 / easel.h
Last active December 2, 2024 22:52
a header-only tweening library for C compatible with C89
#ifndef EASEL_H
#define EASEL_H
/*
** easel.h -- a tweening library compatible with ANSI/C89
** by @thacuber2a03, public domain, or https://unlicense.org where unapplicable
** release 30-10-2024 (dd-mm-yyyy)
*/
#include <string.h>