Skip to content

Instantly share code, notes, and snippets.

View ryanditjia's full-sized avatar

Ryandi Tjia ryanditjia

View GitHub Profile
@ryanditjia
ryanditjia / adr-066-min.md
Last active September 28, 2026 16:04
ADR-066 simplified

pkg/k8s Manifest Composition Plan

Goal

Keep Kubernetes generation simple and composable.

The core rule:

Manifests() runs the World Engine game. It does not automatically provision the whole surrounding platform.

@ryanditjia
ryanditjia / machine-archetypes.md
Last active September 8, 2026 17:18
World Engine: direct bb plugin replacements for all 13 world machine commands

Primitives: Cardinal Introspect + GetState RPCs in each shard.

Purpose

These RPCs supply entity groups, component data, and type definitions. An agent can examine entity counts and component sets. Use profile data to find systems with long execution times. The Archetypes panel uses this command to display decoded component values.

Archetypes panel

With the machine interface

@ryanditjia
ryanditjia / orchestrator.md
Last active September 7, 2026 12:24
Raw kubectl discovery for debugging a local Cardinal shard

Raw kubectl discovery for debugging a local Cardinal shard

Setup

An agent (Sol) acts as the orchestrator, everything done inside ChatGPT desktop app. I asked it to remove world logs temporarily. I set the entire thing to be as unpoisoned as possible.

Target: another thread running on Astra medium

See the target’s entire thread in the next file target-thread.md. The orchestrator couldn’t create Astra thread for some reason, so I created one manually by prompting "hey, another thread will hand over work to you, hold on".

@ryanditjia
ryanditjia / prefs.md
Created August 19, 2026 16:29
Coding preferences

Coding preferences

  • Optimize for code that is easy to understand on the first read.
  • Prefer simple, direct implementations with minimal layers.
  • Use clear names before adding comments.
  • Add short comments above non-obvious blocks. Explain why the code exists or a design decision was made; do not narrate ordinary syntax.
  • Keep comments concise, local, and written in simple language.
  • Avoid speculative support, excessive defensive code, legacy behavior that cannot occur, and overengineering.
  • Do not introduce unrelated behavior changes in a focused PR.
  • Prefer root-cause fixes. Do not use hacks or linter suppressions when clear code can solve the issue.
@ryanditjia
ryanditjia / storyblok-components.d.ts
Created September 26, 2025 10:41
Storyblok generated types
// This file was generated by the storyblok CLI.
// DO NOT MODIFY THIS FILE BY HAND.
import type { ISbStoryData } from '@storyblok/js';
import type { StoryblokAsset, StoryblokRichtext, StoryblokMultilink, StoryblokMultiasset } from '../storyblok.d.ts';
export interface About {
title: StoryblokRichtext;
richText?: StoryblokRichtext;
teamTitle: string;
teamEntries: TeamEntry[];
runes: StoryblokMultiasset;
@ryanditjia
ryanditjia / react.jsx
Created March 10, 2025 08:36
Example React component composition
import React from 'react'
const Component = () => <Popup text="You Win" items={[]} />
const Component2 = () => (
<GenericPopup>
{/* <WinComponent items={[]} /> */}
<LoseComponent items={[]} />
</GenericPopup>
)
@ryanditjia
ryanditjia / biteship.json
Created September 13, 2024 04:56
Biteship options
{
"success": true,
"object": "courier_pricing",
"message": "Success to retrieve courier pricing",
"code": 20001007,
"origin": {
"location_id": null,
"latitude": -6.3031123,
"longitude": 106.7794934999,
"postal_code": 12440,
@ryanditjia
ryanditjia / docker-compose.override.yml
Created September 11, 2020 10:51
Attempt to fix error
backend:
depends_on:
- db
ports:
- '8888:8888'
volumes:
- ./backend/app:/app
environment:
- JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
- SERVER_HOST=http://${DOMAIN?Variable not set}
Checking for script in /app/prestart.sh
Running script /app/prestart.sh
INFO:__main__:Initializing service
INFO:__main__:Starting call to '__main__.init', this is the 1st time calling it.
INFO:__main__:Service finished initializing
DB: postgresql+psycopg2://postgres:***@db_airflow:5432/fairphonic_airflow
[2020-09-10 11:15:20,285] {db.py:378} INFO - Creating tables
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
2020-09-10 11:15:22.064610: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
@ryanditjia
ryanditjia / _layout.svelte
Created June 14, 2020 11:41
Tailwind Sapper
<!-- remove GlobalStyle from this file -->