Skip to content

Instantly share code, notes, and snippets.

View estrattonbailey's full-sized avatar

Eric Bailey estrattonbailey

View GitHub Profile
@estrattonbailey
estrattonbailey / index.ts
Created October 23, 2024 22:44
Cool Codes™
const app = 'bluesky'
@estrattonbailey
estrattonbailey / index.ts
Created April 27, 2023 17:53
Cloudflare KV Cache Wrapper (WIP)
type CacheResponse<T> = {
data: T;
stale: boolean;
};
type CacheEnvelope<T> = {
data: T;
options: {
staleAt?: number;
};
@estrattonbailey
estrattonbailey / shell.sh
Created August 23, 2022 17:58
Move `master` -> `main` (I always forget this lol)
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
~/test.sh index.mjs [-w]

Keybase proof

I hereby claim:

  • I am estrattonbailey on github.
  • I am estrattonbailey (https://keybase.io/estrattonbailey) on keybase.
  • I have a public key ASAkikBjIvQqTw9KAn8t2VHLkG4Czi_bdnatKfFctqrClgo

To claim this, I am signing this object:

import { Button } from '@components/Button';
import * as Type from '@components/Typography';
import Box from '@components/Box';
import Gutter from '@components/Gutter';
import Container from '@components/Container';
import { useSteps, Step } from '@components/Steps';
enum StepIds {
ONE = 'one',
TWO = 'two',
import * as React from 'react';
import { createPortal } from 'react-dom';
import { tack } from 'tackjs';
const Context = React.createContext<any>({});
export function Overlay() {}
export function getCoords(element: HTMLElement) {
const {
@estrattonbailey
estrattonbailey / Dropzone.tsx
Created March 25, 2020 16:47
Enhanced Dropzone - react-dropzone
import * as React from 'react';
import { useDropzone, DropzoneProps, DropzoneState } from 'react-dropzone';
import { Omit } from '@utils/typescript';
import Box from '@components/Box';
import { Button } from '@components/Button';
import { H5, P } from '@components/Typography';
import IconCircleCheckFull from '@icons/CircleCheckFull';
/* eslint-disable */
import * as React from 'react';
import { act } from 'react-dom/test-utils';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import store from '@services/store';
import { AUTH_HYDRATE, AUTH_SET_IS_LOGGED_IN } from '@services/reducers/auth/types';
import { UserRole } from '@api/auth/types';
@estrattonbailey
estrattonbailey / Lag.tsx
Created February 26, 2020 23:18
Delays updating of values.
function Lag<T>({
value,
ttl,
children,
}: {
value: T;
ttl: number;
children(value: T): any;
}) {
const [cache, setCache] = React.useState(value);