Skip to content

Instantly share code, notes, and snippets.

View quantizor's full-sized avatar
🦾
👁️👄👁️

Evan Jacobs quantizor

🦾
👁️👄👁️
View GitHub Profile
@quantizor
quantizor / opus_preview.html
Last active April 8, 2026 20:29
qolour Phase B previews — expected vs conservative loss
<!doctype html>
<html><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>qLAB — qolour palette generator</title>
<style>
* { box-sizing: border-box; }
body { font-family: -apple-system, ui-sans-serif, sans-serif; background: #0b0b0f; color: #e8e8ee; padding: 20px; max-width: 1080px; margin: 0 auto; }
h1 { font-weight: 300; letter-spacing: -0.02em; font-size: 26px; margin: 0 0 6px 0; }
.subtitle { color: #888; font-size: 13px; font-family: ui-monospace, monospace; margin-bottom: 28px; }
@quantizor
quantizor / wolfram.md
Last active April 8, 2026 15:41
Wolfram Agent Profile (For use with Claude or other harnesses)

name: wolfram description: "Computational philosopher agent inspired by Stephen Wolfram for deep investigation and analysis. Use when the user wants to explore problems through the lens of computation, examine systems for underlying simple rules, think about complexity and emergence, investigate whether something can be modeled computationally, or when a topic benefits from Wolfram's distinctive methodology of radical simplification, enumeration of possibilities, and building from minimal models to grand conclusions. The agent investigates the codebase, researches patterns, and develops thinking through sustained computational inquiry — not quick opinions.\n\nExamples:\n\n- user: "Why does this system produce such complex behavior?"\n assistant: (Launch the wolfram agent to investigate complexity emerging from simple rules.)\n\n- user: "What's the simplest model that captures this pattern?"\n assistant: (Launch the wolfram agent to enumerate minimal models.)\n\n- user: "Is there a computational way

@quantizor
quantizor / shopify.d.ts
Created February 26, 2025 20:32
Shopify "Buy Button" JS Types
// Derived these from looking through their docs and some of the source code
// Type definitions for Shopify Buy Button SDK
// Based on https://shopify.github.io/buy-button-js/
declare global {
interface Window {
/**
* The global ShopifyBuy object provided by the Shopify Buy Button SDK.
* Available after loading the SDK script.
@quantizor
quantizor / solid-markdown-to-jsx-example.tsx
Last active December 4, 2024 05:45
Use markdown-to-jsx with SolidJS
import { compiler, type MarkdownToJSX } from 'markdown-to-jsx';
import { Component, JSX } from 'solid-js';
import h from 'solid-js/h';
/**
* A simple HOC for use with SolidJS. Feed the markdown content as a direct child
* and the rest is taken care of automatically.
*/
const Markdown: Component<{ children?: string }> = ({ children = '' }) => {
return compiler(children, {
@quantizor
quantizor / script.sh
Created May 11, 2021 14:37
Vercel Ignored Build Step Diff Branch Against Master/Main
# Vercel only performs a depth=2 shallow repository clone, which makes performing branch-level diffs against your main branch
# impossible without manually fetching more data from git
#
# The following command checks if the origin remote is already set up and fetches it if not, then it performs a diff
# of the current branch being built against `main` (replace with `master` if your project is legacy)
#
# The bang (!) before `git diff` inverts the result because Vercel expects an exit code of 1 for triggering a new build
#
# Finally, if you want to filter the file list for only certain directory or file changes, you can add something like
# this after the `git diff ...` statement:
@quantizor
quantizor / use-promise-hook.js
Last active June 21, 2019 19:12
use-promise-hook
import { useEffect, useState } from 'react';
/**
* Pass a memoized promise getter (via useCallback) so we do not attempt to
* continuously re-request the promise.
*/
export default function usePromise(getPromise) {
const [loading, setLoading] = useState(true);
const [promise, setPromise] = useState();
const [error, setError] = useState();
@quantizor
quantizor / next.config.js
Created June 7, 2019 04:00
optimize nextjs webpack config
module.exports = {
webpack: config => {
if (config.mode === 'production' && config.name === 'client') {
config.optimization.splitChunks.cacheGroups.commons.minChunks = 2;
}
}
}
@quantizor
quantizor / sc.js
Last active August 17, 2018 21:08
test
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.styled={},e.React)}(this,function(e,t){"use strict";var r="default"in t?t.default:t,n=/([A-Z])/g;var a=function(e){return e.replace(n,"-$1").toLowerCase()},o=/^ms-/;var i=function(e){return a(e).replace(o,"-ms-")},s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r
@quantizor
quantizor / Home.js
Last active March 25, 2018 19:32
Buttermilk Holistic Example
export default () => "Home";