Skip to content

Instantly share code, notes, and snippets.

View gmac's full-sized avatar

Greg MacWilliam gmac

View GitHub Profile
This file has been truncated, but you can view the full file.
ALTER TABLE printings ADD COLUMN illustration_id uuid;
ALTER TABLE printings ADD COLUMN illustration_2_id uuid;
UPDATE printings AS p
SET illustration_id = uuid(j.illustration_id)
FROM (VALUES
('d0a7cb23-d229-43c5-addd-dcf423984b0c','38f37870-7b63-4596-bd7b-e4fdfb4d52b5',1),
('21004958-2c7e-4a55-bc80-411c4d780106','f868fd9b-79d8-4269-b13d-3b41bc586895',1),
('efba235e-04e5-449c-906c-0ac33f6d7929','044ee33d-deaa-4cdb-9e5f-f71d5cef572f',1),
This file has been truncated, but you can view the full file.
--
-- Name: illustrations; Type: TABLE; Schema: public; Owner: gregmacwilliam
--
CREATE TABLE illustrations (
id uuid DEFAULT gen_random_uuid() NOT NULL,
artist_id uuid NOT NULL,
artist_2_id uuid,
primary_oracle_id uuid NOT NULL,
[{
"url": "https://78.media.tumblr.com/59102da2539294599648a6f2aa91b26b/tumblr_ocsdjcsiud1vn68joo1_1280.jpg",
"illustration_id": "bcd7f575-5c50-4c3b-bec7-9e90efdb56e8",
"artist_id": "fc021f3d-773a-4706-bbe7-f602324f511f"
}, {
"url": "https://78.media.tumblr.com/61078eeec886a777a864eb2240f2f5b1/tumblr_obp9kv0miM1vn68joo1_1280.jpg",
"illustration_id": "3b6677ad-7ddb-4668-857a-6c0ff052040b",
"artist_id": "fc021f3d-773a-4706-bbe7-f602324f511f"
}, {
"url": "https://78.media.tumblr.com/626fecef05b19c4680f74cb62b3204ff/tumblr_nuvsvjqqN01qepqmao1_1280.jpg",
@gmac
gmac / aws-cors-config.xml
Created September 10, 2018 03:32
Config for direct uploads to S3
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<ExposeHeader>ETag</ExposeHeader>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
class UploadsController < ApplicationController
before_action :require_login
def auth
date_stamp = Date.strptime(params[:datetime], "%Y%m%dT%H%M%SZ").strftime("%Y%m%d")
secret_key = "AWS_SECRET_KEY"
aws_region = "us-east-1" # << set to your region
date_key = OpenSSL::HMAC.digest("sha256", "AWS4" + secret_key, date_stamp)
region_key = OpenSSL::HMAC.digest("sha256", date_key, aws_region)
import Evaporate from 'evaporate';
import sparkMD5 from 'spark-md5';
import sha256 from 'js-sha256';
const uploader = Evaporate.create({
signerUrl: '/uploads/auth',
aws_key: 'AWS_PUBLIC_KEY',
bucket: 'your-bucket-name',
cloudfront: true,
computeContentMd5: true,
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(

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",
<?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>
[
{
"type": "EntryBodyParagraphComponent",
"ops": [
{
"insert": "a man ",
"attributes": {}
},
{
"insert": "a plan",