Skip to content

Instantly share code, notes, and snippets.

View JordanBlount's full-sized avatar

Jordan Blount JordanBlount

View GitHub Profile
'use client'
import useMeasure from 'react-use-measure'
import { ChangeEvent, FC, FormEvent, InputHTMLAttributes, useCallback, useState } from 'react'
enum Status { Idle, Error, Loading, Animate, Success }
const EmailInput = ({ onSubmit, ...props }) => {
const [formRef, dimensions] = useMeasure()
const [value, setValue] = useState<string>('')
@JordanBlount
JordanBlount / LeanText.tsx
Created October 28, 2024 14:52 — forked from hirbod/LeanText.tsx
React Native LeanView and LeanText component
import { type ComponentType, createElement, forwardRef } from 'react'
import type { TextProps } from 'react-native'
// uncomment for NativeWind support
//import { cssInterop } from 'nativewind'
const LeanText = forwardRef((props, ref) => {
return createElement('RCTText', { ...props, ref })
}) as ComponentType<TextProps>
import {
Canvas,
DataSourceParam,
dist,
ImageShader,
rect,
RoundedRect,
rrect,
Shader,
Skia,
@JordanBlount
JordanBlount / index.js
Created December 20, 2023 17:19 — forked from fred-stripe/index.js
Google Cloud Functions + Stripe Webhook signing
/**
* Responds to any HTTP request that can provide a "message" field in the body.
*
* @param {!Object} req Cloud Function request context.
* @param {!Object} res Cloud Function response context.
*/
exports.webhook = (req, res) => {
// Required environment variables:
// WEBHOOK_SIGNING_KEY -- the whsec_xxx value displayed when you enable webhook signing for your endpoint
@JordanBlount
JordanBlount / index.html
Created March 2, 2022 16:49 — forked from mariohmol/index.html
D3 Geo Maps WIth Brazil
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>App</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="me"
href="https://twitter.com/twitterdev"
@JordanBlount
JordanBlount / gh-pages-deploy.md
Created May 31, 2021 05:41 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@JordanBlount
JordanBlount / gist:38708e8246466eaf7a5ee68ae0740380
Created May 16, 2021 22:13 — forked from doginthehat/gist:1890659
compare block helper for handlebars
// {{compare unicorns ponies operator="<"}}
// I knew it, unicorns are just low-quality ponies!
// {{/compare}}
//
// (defaults to == if operator omitted)
//
// {{equal unicorns ponies }}
// That's amazing, unicorns are actually undercover ponies
// {{/equal}}
// (from http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/)
@JordanBlount
JordanBlount / examples.md
Created May 16, 2021 19:05 — forked from ErisDS/examples.md
Ghost Filter Query examples

Filter Queries - Example Use Cases

Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)

Fetch 3 posts with tags which match 'photo' or 'video' and aren't the post with id 5.

api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});

GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3