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 { Plugin } from "graphile-build"; | |
import { | |
PgAttribute, | |
PgClass, | |
PgIntrospectionResultsByKind, | |
} from "graphile-build-pg"; | |
import { | |
embed, | |
gql, | |
makeExtendSchemaPlugin, |
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
{ | |
"0-1": { | |
"description": "Processing center response timeout", | |
"message": "sv_unavailable" | |
}, | |
"0-100": { | |
"description": "No payment attempts", | |
"message": "no_payments_yet" | |
}, | |
"0-2000": { |
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
const ReplaceFieldType: Plugin = (builder) => { | |
// Process the output fields | |
builder.hook("GraphQLObjectType:fields:field", (field, build, context) => { | |
const { getTypeByName, graphql } = build; | |
const { GraphQLList, GraphQLNonNull } = graphql; | |
const { | |
scope: { pgFieldIntrospection: attr }, | |
} = context; |
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 Container from 'components/Container'; | |
import Text from 'components/Text'; | |
import Title from 'components/Title'; | |
import { TERMS_PRIVACY } from 'localization/constants'; | |
import { useI18n } from 'localization/helpers'; | |
import { GetServerSideProps } from 'next'; | |
import React, { FC } from 'react'; | |
import FormRow from 'sections/FormRow'; | |
import useStyles from '../screens/terms-privacy-policy/styles'; |
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 admin from "firebase-admin"; | |
import fs from "fs/promises"; | |
const serviceAccount1 = JSON.parse(await fs.readFile("./service-account-1.json")); | |
const serviceAccount2 = JSON.parse(await fs.readFile("./service-account-2.json")); | |
const admin1 = admin.initializeApp({ credential: admin.credential.cert(serviceAccount1) }, "one"); | |
const admin2 = admin.initializeApp({ credential: admin.credential.cert(serviceAccount2) }, "two"); | |
const db1 = admin1.firestore(); |
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
create or replace function public.gen_id() | |
returns text as $$ | |
declare | |
chars text := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
max_multiple integer := floor(256 / char_length(chars)) * char_length(chars); | |
i integer; | |
auto_id text := ''; | |
target_length integer := 20; | |
bytes bytea; | |
begin |
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 { jsonParse } from "@dataplan/json"; | |
import { access, context, lambda, listen } from "grafast"; | |
import { gql, makeExtendSchemaPlugin } from "graphile-utils"; | |
import { SCHEMA_NAME } from "../config.js"; | |
/* The JSON object that `tg__graphql_subscription()` delivers via NOTIFY */ | |
interface TgGraphQLSubscriptionPayload { | |
event: string; | |
subject: string | 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
import cors from "cors"; | |
import express, { Express, NextFunction } from "express"; | |
import { IncomingMessage, Server, ServerResponse } from "http"; | |
import inspector from "inspector"; | |
import { Duplex } from "stream"; | |
import { isDev, isLocal } from "./config.js"; | |
import * as middleware from "./middleware/index.js"; | |
import { firebaseAuthMiddleware } from "./middleware/installFirebaseAuth.js"; | |
import { makeShutdownActions, ShutdownAction } from "./shutdownActions.js"; |
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 { jsonParse } from "@dataplan/json"; | |
import { access, context, lambda, listen } from "grafast"; | |
import { gql, makeExtendSchemaPlugin } from "graphile-utils"; | |
const PackagePlugin = makeExtendSchemaPlugin((build) => { | |
const { sql } = build; | |
if (!sql) { | |
throw new Error("sql not found"); | |
} |
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
--[[ | |
===================================================================== | |
==================== READ THIS BEFORE CONTINUING ==================== | |
===================================================================== | |
Kickstart.nvim is *not* a distribution. | |
Kickstart.nvim is a template for your own configuration. | |
The goal is that you can read every line of code, top-to-bottom, and understand |