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 axios from 'axios'; | |
import { decode } from 'jsonwebtoken'; | |
import { z } from 'zod'; | |
const cotdListSchema = z.object({ | |
monthList: z.array( | |
z.object({ | |
year: z.number(), | |
month: z.number(), | |
lastDay: z.number(), |
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
[ | |
{ | |
"mapUid": "g7l2eO_x9z4HWGGYj8dVBCDSTEg", | |
"campaignId": 173, | |
"seasonUid": "33181f18-1b3d-4ed4-94b3-92e4c809e1e9", | |
"month": 7, | |
"year": 2020, | |
"date": 1, | |
"name": "$i$sU-Turn", | |
"author": "5c8e45ae-8b0e-492f-a80c-a580f733716f", |
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
/* File generated automatically, do not edit. */ | |
import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely'; | |
export type DBEventType = | |
'goal' | | |
'own-goal' | | |
'penalty-goal' | | |
'penalty-miss' | | |
'yellow-card' | |
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 type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs, QueryResult, RootOperationNode, UnknownRow } from 'kysely'; | |
function toJsonb(func: unknown) { | |
if (typeof func !== 'string') { | |
throw new Error('Invalid function'); | |
} | |
switch (func) { | |
case 'json_agg': return 'jsonb_agg'; | |
case 'to_json': return 'to_jsonb'; |
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 d3 from 'd3'; | |
import { useEffect, useRef } from 'react'; | |
import { AbsoluteFill, spring, useCurrentFrame, useVideoConfig } from 'remotion'; | |
// Dataset | |
type Letter = { | |
letter: string; | |
frequency: number; | |
}; |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/charmbracelet/bubbles/stopwatch" | |
tea "github.com/charmbracelet/bubbletea" | |
) |
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
package main | |
import ( | |
"fmt" | |
"os" | |
tea "github.com/charmbracelet/bubbletea" | |
) | |
type PageNumber int |
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 axios from 'axios'; | |
class RedditClient { | |
constructor({ clientId, clientSecret, refreshToken, userAgent }) { | |
this.accessTokenExpire = new Date(Date.now() - 1000); | |
this.authToken = Buffer.from(`${clientId}:${clientSecret}`).toString('base64'); | |
this.refreshToken = refreshToken; | |
this.userAgent = userAgent; | |
} |
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 { join, relative, sep } from "node:path"; | |
import { recase } from '@kristiandupont/recase'; | |
import kanel from 'kanel'; | |
import kanelKysely from 'kanel-kysely'; | |
const toCamelCase = recase('snake', 'camel'); | |
const toPascalCase = recase('snake', 'pascal'); | |
export function trimWhitespaceHook(path, lines, instantiatedConfig) { | |
return lines.filter((line, index, array) => { |
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
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never; | |
const commands = [ | |
{ | |
name: 'foo', | |
options: [ | |
{ name: 'foo-string', type: 'STRING', autocomplete: true }, | |
{ name: 'foo-integer', type: 'INTEGER' }, | |
], | |
}, |
NewerOlder