This file contains hidden or 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
> import dynamic from "next/dynamic"; | |
> | |
> import { createAdmin } from "../../../services/Cms/ClientAdminUi"; | |
> | |
> const Blank = () => <></>; | |
> | |
> export const AdminPageContainer = dynamic( | |
> async () => { | |
> if (typeof window === "undefined") return Blank; | |
> await createAdmin(); |
-
drop all the files included (replacing
_
with/
) -
create three apps in github oauth settings:
Local DEV
,Staging
,Prod
- https://github.com/settings/applications/new
- fillout the details: don't worry too much right now you can change all these later
name
: ☝️home page
: your url (http://localhost:3000
,https://staging.your.doma.in
,https://your.doma.in
)description
: whatever... but the user will see thisauthorization callback url
: as above but with/api/callback
: (http://localhost:3000/api/callback
,https://staging.your.doma.in/api/callback
,https://your.doma.in/api/callback
)
-
on the application detail page:
This file contains hidden or 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
import type { PropsWithChildren } from "react"; | |
import { useBlanket } from "./useBlanket"; | |
export function Blanket({ children }: PropsWithChildren) { | |
const { isOpen, setIsOpen, zIndex, color } = useBlanket(); | |
return ( | |
<> | |
{isOpen && ( | |
<div |
This file contains hidden or 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
import type { RefObject } from "react"; | |
import { useCallback } from "react"; | |
import { useState, useEffect } from "react"; | |
type UseDragOptions = { | |
onPointerDown?: (event: PointerEvent) => void; | |
onPointerUp?: (event: PointerEvent) => void; | |
onPointerMove?: (event: PointerEvent) => void; | |
onDrag?: (event: DragEvent) => void; | |
}; |
This file contains hidden or 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
#!/bin/sh | |
# | |
# Requires | |
# - [httpie](https://httpie.io/cli) | |
# - [jq](https://stedolan.github.io/jq/) | |
# - [fzf](https://github.com/junegunn/fzf) | |
# - GITHUB_TOKEN with `repos` and `delete repos` scope. | |
http https://api.github.com/user/repos "Authorization:token $GITHUB_TOKEN" per_page==100 type==owner \ | |
| jq '.[] | select(.fork==true) | .full_name' \ |
This file contains hidden or 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
name: ci | |
# https://github.com/docker/build-push-action/blob/master/docs/advanced/tags-labels.md | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: |
This file contains hidden or 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
import { createLocalStorage } from "localstorage-ponyfill"; | |
export const isBrowser = | |
typeof window !== 'undefined' && | |
typeof window.document !== 'undefined'; | |
export const isNode = | |
typeof process !== 'undefined' && | |
process.versions != null && | |
process.versions.node != null; |
This file contains hidden or 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
... | |
functionGlobalContext: { | |
i2c:require('i2c'), | |
os:require('os'), | |
fs:require('fs'), | |
glob:require('glob'), | |
ua:require('universal-analytics') | |
// jfive:require("johnny-five"), |
This file contains hidden or 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
#!/usr/bin/env node | |
console.log('yay gist') |