Skip to content

Instantly share code, notes, and snippets.

@Ryman
Ryman / curveBrushExample.txt
Created October 28, 2025 18:13 — forked from spacehare/curveBrushExample.txt
Quake. Trenchbroom. brush curve example. uses protoype 1.3 textures (http://khreathor.xyz/site/prototype/)
// entity 0
{
"classname" "func_detail"
// brush 0
{
( 2400 -128 264 ) ( 2432 -384 392 ) ( 2432 -384 264 ) 128_cyan_1 [ 0.12403473458920847 -0.9922778767136677 0 0 ] [ 0 -0 -1 0 ] 0 1 1
( 2176 -448 232 ) ( 2177 -448 232 ) ( 2176 -447 232 ) 128_cyan_1 [ -1 0 0 0 ] [ -0 -1 -0 0 ] 0 1 1
( 2496 -128 296 ) ( 2496 -127 296 ) ( 2497 -128 296 ) 128_cyan_1 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 2496 -192 296 ) ( 2497 -192 296 ) ( 2496 -192 297 ) 128_cyan_1 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 2432 -128 296 ) ( 2432 -128 297 ) ( 2432 -127 296 ) 128_cyan_1 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
@Ryman
Ryman / Git Subtree basics.md
Created April 3, 2025 12:35 — forked from SKempin/Git Subtree basics.md
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@Ryman
Ryman / sse-worker.js
Created February 13, 2025 00:33 — forked from bouroo/sse-worker.js
example for cloudflare worker server-sent events
/**
* Welcome to Cloudflare Workers! This is your first worker.
*
* - Run "npm run dev" in your terminal to start a development server
* - Open a browser tab at http://localhost:8787/ to see your worker in action
* - Run "npm run deploy" to publish your worker
*
* Learn more at https://developers.cloudflare.com/workers/
*/
@Ryman
Ryman / natto-eval.js
Created March 1, 2024 11:47 — forked from paulshen/natto-eval.js
natto.dev eval pseudocode
const f = useMemo(() => {
try {
return new Function('inputs', `return ${expression}`);
} catch (e) {
return [e];
}
}, [expresssion]);
// input atoms
@Ryman
Ryman / generate.c
Created February 22, 2024 13:43 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@Ryman
Ryman / Dockerfile
Created January 14, 2024 19:23 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@Ryman
Ryman / Twin Vaklyr Hover analysis.txt
Created December 26, 2023 17:21 — forked from chaodhib/Twin Vaklyr Hover analysis.txt
Twin Vaklyr Hover analysis
// ---------------------------------------------------------------------
// 1) creation of the one of the 2 twins.
// ---------------------------------------------------------------------
ServerToClient: SMSG_COMPRESSED_UPDATE_OBJECT (0x01F6) Length: 365 ConnIdx: 0 Time: 03/20/2010 15:15:00.000 Number: 286284
[4] UpdateType: CreateObject2
[4] GUID: Full: 0xF1300086C1003546 Type: Creature Entry: 34497 (Fjola Lightbane) Low: 13638
[4] Object Type: Unit (3)
[4] Update Flags: Living, StationaryObject (96)
[4] Movement Flags: Hover (1073741824)
[4] Extra Movement Flags: None (0)
@Ryman
Ryman / 00_README.md
Created December 21, 2023 21:36 — forked from LeZuse/00_README.md
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@Ryman
Ryman / roflcopter.md
Created December 16, 2023 16:38 — forked from MatthewRalston/roflcopter.md
ROFLcopter ASCII text art

ROFLcopter ASCII

If you hear SOI SOI SOI, you better RUN RUN RUN ’cause the ROFLCOPTER ASCII army is coming for you!

THE ORIGINAL ROFLCOPTER

 ROFL:ROFL:ROFL:ROFL
         _^___
 L __/ [] \
@Ryman
Ryman / jq-cheetsheet.md
Created September 8, 2023 19:24 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq