Skip to content

Instantly share code, notes, and snippets.

View gmac's full-sized avatar

Greg MacWilliam gmac

View GitHub Profile
@gmac
gmac / graphql-response_fixture.rb
Created March 18, 2025 21:22
graphql response fixture
module GraphQL
class ResponseFixture
SYSTEM_TYPENAME = "__typename__"
SCALAR_VALIDATORS = {
"Boolean" => -> (data) { data.is_a?(TrueClass) || data.is_a?(FalseClass) },
"Float" => -> (data) { data.is_a?(Numeric) },
"ID" => -> (data) { data.is_a?(String) || data.is_a?(Integer) },
"Int" => -> (data) { data.is_a?(Integer) },
"String" => -> (data) { data.is_a?(String) },
"JSON" => -> (data) { data.is_a?(Hash) },
@gmac
gmac / extensions.graphql
Last active February 2, 2025 12:33
Extensions
interface Node {
id: ID!
}
type Product implements Node {
id: ID!
extensions: ProductExtension
}
type ProductExtension {
@gmac
gmac / bulk_input.jsonl
Created July 26, 2023 20:46
Bulk Input
{ "input": { "handle": "alpha", "descriptionHtml": "alpha", "title": "Alpha" } }
{ "input": { "handle": "bravo", "descriptionHtml": "bravo", "title": "Bravo" } }
{
"MergedSchema": "directive @boundary on OBJECT | FIELD_DEFINITION\ntype Foo @boundary {\n\tid: ID!\n\tgqlgen: Boolean!\n\tnodejs: Boolean!\n}\ntype Query {\n\trandomFoo: Foo!\n}\n",
"Services": [
{
"Name": "gqlgen",
"ServiceURL": "https://localhost:3000",
},
{
"Name": "nodejs",
"ServiceURL": "https://localhost:3001",
@gmac
gmac / entrybody.graphql
Created April 22, 2020 21:48
Chorus EntryBody query
query FetchEntry($uuid: String!) {
entry(uuid: $uuid) {
body {
components {
type
attributes {
alignment
}
...ActionboxAttrs
...BlockquoteAttrs
module.exports = [
{ insert: 'a man ' },
{ insert: 'a plan', attributes: { italic: true } },
{ insert: ' ' },
{ insert: 'panama', attributes: { bold: true } },
{ insert: '\n' },
{ insert: 'hello', attributes: { italic: true } },
{ insert: ' goodbye\n' },
{ insert: 'bold', attributes: { bold: true } },
{ insert: ' ' },
[
{
"type": "EntryBodyParagraphComponent",
"ops": [
{
"insert": "a man ",
"attributes": {}
},
{
"insert": "a plan",
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<url>
<loc>https://revolt.tv/videos/blueface-performs-bleed-strings-attached-003ee507</loc>
<lastmod>2019-05-03</lastmod>
</url>
<url>
<loc>https://revolt.tv/videos/festival-life-scottie-beam-ad-revolt-house-austin-006c3978</loc>
<lastmod>2019-04-01</lastmod>

First, the design system gets broken down into three parts: palette, theme, and config.

Palette

A palette is a set of values that admins can manage directly. Palette fields accept raw input (numbers, hex codes, etc). A palette would look like this:

palette = {
  "color1-faded": "#xxx",
  "color1-light": "#xxx",
document.querySelector('#file-field').addEventListener('change', (evt) => {
uploader.then((evaporate) => {
Array.from(evt.target.files).forEach((file) => {
evaporate.add({
file,
name: file.name,
progress: (progressValue) => console.log('Progress', progressValue),
complete: (_xhr, awsKey) => console.log('Complete!', awsKey),
}).then(