Skip to content

Instantly share code, notes, and snippets.

View fauxparse's full-sized avatar

Matt Powell fauxparse

View GitHub Profile
@fauxparse
fauxparse / theme-replacement-preview.html
Last active August 10, 2026 03:59
Mechanē issue 189 replacement theme candidate preview
<!doctype html>
<meta charset="utf-8">
<title>Mechanē issue 189 theme replacement preview</title>
<style>
:root { font: 14px/1.45 system-ui, sans-serif; color: #f8fafc; background: #0f172a; }
body { margin: 0; padding: 32px; }
h1 { margin: 0 0 8px; }
.note { color: #94a3b8; margin: 0 0 24px; }
.candidate { margin: 24px 0 40px; }
.candidate h2 { margin: 0 0 12px; }
@fauxparse
fauxparse / comparison.html
Created August 10, 2026 03:37
Mechanē issue 186 colour scale prototype comparisons
<!doctype html><meta charset="utf-8"><title>Issue 186 colour scale prototype</title><style>body{font:14px system-ui;margin:32px;background:#f6f6f6;color:#222}section{background:#fff;padding:16px;margin:16px 0;border-radius:8px;box-shadow:0 1px 4px #0002}svg{display:block;max-width:980px;margin:8px 0;border:1px solid #ddd;background:#fff}code{font-family:ui-monospace,monospace}</style><h1>Issue 186 colour scale prototype</h1><p>Delta-transfer vs fixed-lightness baseline. Each row pins the seed at its nearest reference rung, then applies either clamp-chroma or CSS4-style hue-preserving gamut mapping.</p><section><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 980 92" role="img" aria-label="gruvbox-dark-medium · red · delta-transfer · clamp-chroma"><style>text{font:12px system-ui;fill:#222} .label{font-weight:600}</style><text class="label" x="0" y="14">gruvbox-dark-medium · red · delta-transfer · clamp-chroma · seed #fb4934</text><g transform="translate(0,24)"><g transform="translate(0,0)"><rect width="76"
import { AnimatePresence, motion, useIsPresent, Variants } from 'framer-motion'
import { ComponentProps, useRef } from 'react'
import {
Outlet,
RouterContextProvider,
useMatch,
useMatches,
useRouter,
useRouterState,
} from '@tanstack/react-router'
@fauxparse
fauxparse / manifest.json
Created June 5, 2025 04:11
Add copy button to Github PRs
{
"manifest_version": 2,
"name": "Copy PR details",
"version": "1.0",
"description": "Copies Github PR details to clipboard for pasting into Slack",
"permissions": [
"activeTab"
],
"content_scripts": [
{
require 'active_support/core_ext/range/overlaps'
class RangeSet
include Enumerable
def initialize(ranges = [])
@ranges = Set.new(self.class.merge_all(ranges.to_a))
end
def <<(range)
{"name":"exported","settings":"{\"settings\":\"{\\n \\\"[css]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"sibiraj-s.vscode-scss-formatter\\\"\\n },\\n \\\"[html]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"vscode.html-language-features\\\"\\n },\\n \\\"[javascript]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[javascriptreact]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[json]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[jsonc]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[postcss]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"stylelint.vscode-stylelint\\\"\\n },\\n \\\"[scss]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"sibiraj-s.vscode-scss-formatter\\\"\\n },\\n \\\"[typescript]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\n },\\n \\\"[typescriptreact]\\\"
@fauxparse
fauxparse / childContext.ts
Last active January 17, 2023 20:36
XState child state context
const Machine = createMachine({
context: {
name: '',
},
schema: {
context: {} as { name: string },
},
states: {
A: {
on: {
@fauxparse
fauxparse / clickToAdvance.js
Last active January 17, 2020 03:05
RxJS fiddles
const { of, fromEvent } = Rx;
const { expand, map, zip } = RxOperators;
const click$ = fromEvent(document, 'click')
of(1).pipe(
expand(x => (
of(x + 1)
.pipe(
zip(click$),
@fauxparse
fauxparse / 00_title.txt
Last active October 15, 2018 01:22
RubyConf AU 2019 talk proposal
It’s just makeup! How to care about CSS
@fauxparse
fauxparse / Actions.js
Last active September 11, 2018 23:54
Permissions HOC
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import withPermissions from './withPermissions';
import Permissions from './Permissions';
class Actions extends Component {
render() {
const { user: { name, id }, permissions } = this.props;