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
Database: | |
"root": { | |
"reservations": { | |
"-59a9ac14cf84dddb10852e65": { | |
"details": { | |
"message": "in labore velit quis commodo.", | |
"children": 0, | |
"adults": 5, | |
"tel": "+36-96-055-6277", | |
"email": "consequat@ipsum.com", |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
declare module "@sanity/block-content-to-react" | |
{ | |
import * as React from "react" | |
export interface BlockContentProps { | |
/** | |
* Pass in either an array or a single object of [Portable Text](https://github.com/portabletext/portabletext) | |
* | |
* *This is the only required prop* | |
*/ |
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 * as React from "react" | |
/** Scrolls to an element after that element is added to the DOM */ | |
const useEventualScroll = ( | |
/** | |
* Holds the element to scroll to. | |
* The closer it is to that element, the less Mutations are observed | |
* by MutationObserver. If not defined, document will be used. | |
*/ | |
container?: null | HTMLElement |
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 profile(profile) { | |
return ({ | |
...profile, | |
id: profile.sub, | |
name: profile["http://domain.com/Events/Customer/Fullname"] ?? profile["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"], | |
verified: profile["email_verified"] === "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
// I wish this file to be generated from my *.gql files | |
declare module '*/queries.gql' { | |
export const Something: string; | |
export const SomethingElse: string; | |
} |
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 fs from "fs" | |
import path from "path" | |
import chalk from "chalk" | |
const getDirectories = (source ) => { | |
const dirents = fs.readdirSync(source, { withFileTypes: true }) | |
return dirents | |
.filter( | |
(dirent) => |
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 NodeCache from "node-cache" | |
const cache = new NodeCache() | |
/** | |
* Retrieves an access_token from an OAuth Provider for building purposes, | |
* using client_credentials (client secret) authorization type. | |
*/ | |
export default async function getBuildToken(){ | |
try { |
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
az aks get-credentials --resource-group k8s-demo-ss --name k8s-demo-cluster-ss --file kubeconfig-ss |
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 { NextApiRequest, NextApiResponse } from "next" | |
import log, { LogLevel } from "utils/server-logger" | |
import StackTraceGPS from "stacktrace-gps" | |
import ErrorStackParser from "error-stack-parser" | |
import fs from "fs" | |
import path from "path" | |
export default async function logger( | |
req: NextApiRequest, | |
res: NextApiResponse |
OlderNewer