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 wait = async (time) => new Promise((resolve) => setTimeout(resolve, milliseconds)); |
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 isEmpty = obj => Reflect.ownKeys(obj).length === 0 && obj.constructor === Object |
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 characterCount = (str, char) => str.split(char).length - 1 |
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
// Test process of adding a post to the dataset | |
curl 'https://<PROJECT>.api.sanity.io/v2021-06-07/data/mutate/<DATASET>' \ | |
-H "Authorization: Bearer <TOKEN>" \ | |
-H 'Content-Type: application/json' \ | |
--data-binary '{"mutations":[{ "create": {"_id": "postTestID","title": "Test Title","_type": "site.post"} }]}' |
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
CF_ACCOUNT_ID=<YOUR_CLOUDFLARE_ACCT_ID> wrangler publish |
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
"startString"(\n|.)*?"finishString" |
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
curl -H "Authorization: Token {API_TOKEN}" https://cms.megaphone.fm/api/networks/{networkID}/podcasts/{podcastID}/episodes? |
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
.embed-container { | |
--video--width: 1296; | |
--video--height: 540; | |
position: relative; | |
padding-bottom: calc(var(--video--height) / var(--video--width) * 100%); /* 41.66666667% */ | |
overflow: hidden; | |
max-width: 100%; | |
background: black; | |
} |
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
import React from 'react'; | |
import S from '@sanity/desk-tool/structure-builder'; | |
import sanityClient from 'part:@sanity/base/client'; | |
import { IntentLink, Link } from 'part:@sanity/base/router'; | |
import { Card, Stack, Text, Table } from '@sanity/ui'; | |
import { Article, Browser } from 'phosphor-react'; | |
import { standardViews } from '../previews/standard'; | |
const i1 = Article; |
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
name: 3200.PRO Refresh Gatsby Preview | |
on: | |
schedule: | |
- cron: "0 */8 * * *" # Visit https://crontab.guru/examples.html for cron scheduling examples | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: muinmomin/webhook-action@v1.0.0 |