Skip to content

Instantly share code, notes, and snippets.

View kziemski's full-sized avatar

Kryspin Ziemski kziemski

View GitHub Profile
@kziemski
kziemski / webpackStyleTagTransformPlugin.js
Created October 24, 2025 21:16 — forked from marcosmapf/webpackStyleTagTransformPlugin.js
Modification of Webpack style-loader module bundler that enable where to insert the css styles
/*
* Alternative version of StyleTagTransform option of Webpack's style-loader module bundler that enables
* bundled project to insert imported styles on different container elements conditionally.
* This enables usage of Module Federation Apps inside ShadowDom containers.
*
* Users should provide an "attributes" option on the project's Webpack style-loader configuration that contains
* the element's reference on the window object
*/
@kziemski
kziemski / webpack.production.js
Created October 24, 2025 21:16 — forked from marcosmapf/webpack.production.js
Webpack configuration that enables App usage inside Shadow Dom and as a Module Federation
/*
* Webpack bundle configuration that enables project export as UMD library and Module Federated container
*
* Custom styleTagTransform script is defined at https://gist.github.com/marcosmapf/904986dde911148e39a17a59dc3dd132
* The 'from' option attribute is used inside styleTagTransform as a reference to the project's root element
*/
const { join } = require('path')
const { container, EnvironmentPlugin } = require('webpack')
@kziemski
kziemski / index.js
Created October 24, 2025 21:16 — forked from marcosmapf/index.js
UMD / Module Federated App's entrypoint file
/*
* This file is imported as the entrypoint for the Module Federation or UMD bundle.
* Exporting an async function as the project's entrypoint enables Module Federation Plugin to resolve the dependency tree
* before the dependencies are actually used, which enables dependency sharing between modules
*/
export default props => {
import('./bootstrap').then(({ default: bootstrap }) => bootstrap(props))
}
@kziemski
kziemski / app-mf-bootstrap.tsx
Created October 24, 2025 21:16 — forked from marcosmapf/app-mf-bootstrap.tsx
Module Federated app's startup file
import React, { lazy, Suspense, useEffect } from 'react'
import { render } from 'react-dom'
import { initRequestConfiguration } from 'utils/request'
import {
initializeTagManager,
setLocales,
setToken
} from 'startup/utils'
import { initRequestConfiguration } from 'utils/request'
@kziemski
kziemski / app-umd-bootstrap.tsx
Created October 24, 2025 21:12 — forked from marcosmapf/app-umd-bootstrap.tsx
UMD App's startup file
import React, { lazy, Suspense } from 'react'
import { render } from 'react-dom'
import { initRequestConfiguration } from 'utils/request'
import {
createShadowDom,
initializeTagManager,
setLocales,
setToken
} from 'startup/utils'
@kziemski
kziemski / federatedApp.ts
Created October 24, 2025 21:12 — forked from marcosmapf/federatedApp.ts
Util module that helps handling load and registration of Module Federated containers
type FederatedAppRender = (props?: any) => void
export interface FederatedAppList {
[key: string]: () => Promise<FederatedAppRender>
}
export interface FederatedApp {
render?: FederatedAppRender
root: HTMLElement
}
@kziemski
kziemski / Flow.md
Created October 6, 2025 15:02 — forked from ruvnet/Flow.md
Claude Flow Playbook for Advanced Coordination, Context Engineering, and Artifact-Centric Swarms

Claude Flow treats memory as the backbone and MCP tools as the hands. You get concurrent agents that coordinate cleanly, keep context tight, and ship durable artifacts without dragging long text through prompts. It feels like an ops layer for intelligence.

The stack is simple. Claude Code as the client. Claude Flow as the MCP server. SQLite memory at .swarm/memory.db for state, events, patterns, workflow checkpoints, and consensus. Artifacts hold the big payloads. Manifests in memory link everything with ids, tags, and checksums.

Coordination is explicit. Agents write hints to a shared blackboard, gate risky steps behind consensus, and record every transition as an event. Hooks inject minimal context before tools run and persist verified outcomes after. Small bundles in, durable facts out.

Planning keeps runs stable. Use GOAP to sequence actions with clear preconditions. Use OODA to shorten loops.

Observe metrics, orient with patterns, decide through votes, act with orchestration. Topology adapts from hi

@kziemski
kziemski / KVM_in_WSL2.md
Created September 12, 2025 06:19 — forked from startergo/KVM_in_WSL2.md
KVM on WSL2 Windows 11
  • In WSL2 run:
sudo apt update
sudo apt install qemu qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils cpu-checker \
network-manager iptables-persistent linux-headers-generic \
qemu uml-utilities virt-manager git \
wget libguestfs-tools p7zip-full make dmg2img tesseract-ocr \
tesseract-ocr-eng genisoimage vim net-tools screen firewalld libncurses-dev -y
sudo apt install virt-manager
sudo addgroup kvm
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[338],{578:(e,t,r)=>{e.exports=r.p+"7cf7ced34f0a1ece31b4.wasm"},338:(e,t,r)=>{var n;r.r(t),r.d(t,{default:()=>a});const a=(n="file:///private/tmp/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs",function(e={}){var t,a,o=e;function i(e){e={log:e||function(){}};for(const t of i.za)t(e);return o.quickJSEmscriptenExtensions=e}o.ready=new Promise(((e,r)=>{t=e,a=r})),i.za=[],o.quickjsEmscriptenInit=i,i.za.push((e=>{e.getWasmMemory=function(){return Q}}));var _,u=Object.assign({},o),l="./this.program",s="object"==typeof window,f="function"==typeof importScripts,S="";(s||f)&&(f?S=self.location.href:"undefined"!=typeof document&&document.currentScript&&(S=document.currentScript.src),n&&(S=n),S=0!==S.indexOf("blob:")?S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f&&(_=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var c,T=o.print||con
@kziemski
kziemski / com.chrome.devtools.json.ts
Created July 15, 2025 20:34 — forked from JLarky/com.chrome.devtools.json.ts
Astro .well-known/appspecific/com.chrome.devtools.json.ts
// put this in src/pages/.well-known/appspecific/com.chrome.devtools.json.ts
import type { APIRoute } from "astro"
import { join } from "node:path"
// https://chromium.googlesource.com/devtools/devtools-frontend/+/main/docs/ecosystem/automatic_workspace_folders.md
export const GET: APIRoute = () => {
return new Response(
JSON.stringify({
"workspace": {
"root": join(import.meta.dirname, "../../../../../.."),