Skip to content

Instantly share code, notes, and snippets.

@k1000
k1000 / fallow-parallel-workflow.json
Created June 4, 2026 12:21
run-workflow TypeScript runner with safety gates: dirty-worktree guard, Task validation commands, context merge, hit printing, pi isolation. Fallow workflow validates typecheck before commit.
{
"name": "Fallow Scan → Parallel Simplify Loop",
"startAt": "DiscoverStructure",
"states": {
"DiscoverStructure": {
"type": "Task",
"comment": "Discover all domain packages. Outputs object with 'domains' array.",
"agent": "pi",
"agentConfig": { "model": "deepseek/deepseek-v4-flash" },
"prompt": "List all domain packages in packages/domains/ with their paths and sizes.\n\nRun this: for d in packages/domains/*/; do name=$(basename \"$d\"); size=$(du -sh \"$d\" | cut -f1); echo \"{\\\"name\\\":\\\"$name\\\",\\\"path\\\":\\\"${d%/}\\\",\\\"size\\\":\\\"$size\\\"}\"; done\n\nWrap those lines into: {\"domains\": [{\"name\":\"...\",\"path\":\"...\",\"size\":\"...\"}, ...]}\n\nOutput ONLY that JSON object, no markdown.",
@k1000
k1000 / fallow-parallel-workflow.json
Created June 4, 2026 09:43
run-workflow: ASL-inspired state machine runner in TypeScript — Task, Choice, Parallel, Map, Wait, Retry/Catch. Context merging, auto-increment counters, hit extraction, pi-from-pi isolation. Run: npx tsx run-workflow.ts workflow.json
{
"name": "Fallow Scan → Parallel Simplify Loop",
"startAt": "DiscoverStructure",
"states": {
"DiscoverStructure": {
"type": "Task",
"comment": "Discover all domain packages. Outputs object with 'domains' array.",
"agent": "pi",
"agentConfig": { "model": "deepseek/deepseek-v4-flash" },
"prompt": "List all domain packages in packages/domains/ with their paths and sizes.\n\nRun this: for d in packages/domains/*/; do name=$(basename \"$d\"); size=$(du -sh \"$d\" | cut -f1); echo \"{\\\"name\\\":\\\"$name\\\",\\\"path\\\":\\\"${d%/}\\\",\\\"size\\\":\\\"$size\\\"}\"; done\n\nWrap those lines into: {\"domains\": [{\"name\":\"...\",\"path\":\"...\",\"size\":\"...\"}, ...]}\n\nOutput ONLY that JSON object, no markdown.",
@k1000
k1000 / iterate-actions-example.json
Created June 4, 2026 07:27
iterate-actions: loop through a plan file, invoking Claude Code or Pi per action
{
"name": "Example: Analyze and Fix Type Issues",
"defaults": {
"agent": "claude"
},
"actions": [
{
"id": "01-analyze-types",
"description": "Scan for type issues in broker domain",
"agent": "pi",
@k1000
k1000 / package.json
Created August 18, 2024 06:45 — forked from louis030195/package.json
A 100% local and typescript LLM in Apple Shortcut to be used everywhere on your computer in <1 second
{
"dependencies": {
"@llama-node/llama-cpp": "^0.0.32",
"llama-node": "^0.0.32"
},
"devDependencies": {
"@types/node": "^18.16.3"
}
}
CURRICULUM VITAE
Kamil Selwa
Email: selwak@gmail.com
Phone: +39 345 813 0128
GitHub: https://github.com/k1000/
LinkedIn: https://www.linkedin.com/in/kamilselwa/
Nationality: Polish
Residence: Italy
@k1000
k1000 / proof-of-virginity-vocab.md
Last active March 17, 2023 16:03
Proof of Virginity - VC
@k1000
k1000 / index.js
Last active March 16, 2021 18:59
implementation Marvel API, mongodb, Auth0 (Github)
const crypto = require("crypto");
const fetch = require('node-fetch');
const express = require('express');
const lusca = require('lusca');
const bodyParser = require('body-parser');
const mongoose = require('mongoose');
const session = require('express-session');
const passport = require('passport');
const GithubStrategy = require('passport-github').Strategy;
require('dotenv').config();
@k1000
k1000 / index.js
Created March 16, 2021 13:17
marvelouz
const express = require('express')
const crypto = require("crypto");
const fetch = require('node-fetch');
const mongoose = require('mongoose');
const { auth } = require('express-openid-connect');
require('dotenv').config();
const PORT = process.env.PORT || 5000
const mongo_uri = `mongodb+srv://${process.env.MONGO_USER}:${process.env.MONGO_PASS}@cluster0.u4tzh.mongodb.net/myFirstDatabase?retryWrites=true&w=majority`;
import {AsyncStorage } from 'react-native';
import {Actions} from 'react-native-router-flux';
import Calendar from '../app/calendar';
const moment = require('moment');
const callib = require('./callib.js');
const aspects = require('../data/favorable_days.json');
const constellations = require('../data/constellations.json');
const signsByNum = require('../data/signs_num.json');
const signsByName = require('../data/tib_signs.json');
# FUNK from https://colab.research.google.com/drive/12rWn1enSZP6OTgYgRT1OYFhFnt7QFfIu#scrollTo=dwe_prwCn2HH
def moving_average(df, n):
MA = pd.Series(df['Close'].rolling(n, min_periods=n).mean(), name='MA_' + str(n))
df = df.join(MA)
return df
def exponential_moving_average(df, n):
EMA = pd.Series(df['Close'].ewm(span=n, min_periods=n).mean(), name="EMA_" + str(n))
df = df.join(EMA)