Now at https://github.com/rattrayalex/fastify-openapi-typescript-demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
setup: true | |
orbs: | |
continuation: circleci/continuation@0.1.2 | |
jobs: | |
determine-workflow: | |
machine: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# | |
# export BUCKET='my-bucket-name' | |
# b2-archive-files myfile mydirectory myotherfile | |
# | |
# You can find large files in a directory with "du -ahx . | sort -h". | |
archive() ( | |
set -eo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WhyShouldTheseBeDifferent = () => { | |
return ( | |
<div> | |
If you start with this code: | |
{showTheThing || pleaseShowTheThing ? ( | |
<Foo attribute="such and such stuff here" /> | |
) : showTheOtherThing ? ( | |
<Bar /> | |
) : null} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For posterity, I'm saving/sharing some code I wrote for a shopify app I ran | |
// in which I had two physical warehouses: one in Maryland, and one in California. | |
// Each of these was its own "Location" in Shopify, and I wanted every order | |
// to be automatically assigned to one or the other based on the shipping address. | |
// I ran this webhook on Autocode: https://autocode.com/ | |
// which makes it really easy to stand up a webhook without futzing with servers. | |
const Shopify = require('shopify-api-node'); | |
const shopify = new Shopify({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query MyQuery { | |
films( | |
filter: {and: [ | |
{title: {startsWith: "A"}}, | |
{releaseYear: {equalTo: 2006}} | |
]}, | |
first: 3 | |
) { | |
nodes { | |
title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query MyQuery { | |
actor(actorId: 10) { | |
firstName | |
lastName | |
filmActors { | |
nodes { | |
film { | |
title | |
description | |
} |
I want something that I can share with a development team that's just focused on features and doesn't want to think about the tools at hand very much (but can deeply fine-tune where needed).
Postgraphile seems like an amazing place to start for this.
Here's what I might want to build on top of it (though ideally it'd be baked-in):
Each "table" (think pg_class) should have a single file where ~all logic around that table is contained in as declarative a format as possible.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debounce(callback) { | |
let timeout = null; | |
return function() { | |
const next = () => callback.apply(this, arguments); | |
cancelAnimationFrame(timeout); | |
timeout = requestAnimationFrame(next); | |
} | |
} | |
const observerOptions = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div class="has-emoji">Hello world! I'm a unicorn: 🦄</div> | |
<script> | |
// Stolen from Modernizr: https://github.com/Modernizr/Modernizr/blob/v3.5.0/feature-detects/emoji.js | |
const hasEmojiSupport = () => { | |
var pixelRatio = window.devicePixelRatio || 1; | |
var offset = 12 * pixelRatio; | |
var node = document.createElement('canvas'); |