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
//go from a time in ms to human-readable | |
function formatTime(t){ | |
var hrs = Math.floor(t / (1000*60*60)); | |
t = t % (1000*60*60); | |
var mins = Math.floor(t / (1000*60)); | |
t = t % (1000*60); | |
var secs = Math.floor(t / 1000); | |
t = padZeros((t % 1000).toString(), 3).substring(0, 2); | |
return padZeros(mins, 2) + ":" + padZeros(secs, 2) + '.' + t; | |
} |
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
http://bobux.tommyinnitpoop.xyz/ |
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
./scripts/traverseTranslations.ts | |
./scripts/generateTranslationTypes.ts | |
./scripts/syncTranslations.ts | |
./src/generated/translationKeys.ts | |
./src/@types/react-datetime-picker.d.ts | |
./src/app/atoms.ts | |
./src/app/utils/showErrorToast.ts | |
./src/app/utils/useMeQuery.ts | |
./src/app/utils/useTokenStore.ts | |
./src/app/utils/dateFormat.ts |
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 ReactDOM from "react-dom"; | |
import * as Sentry from "@sentry/react"; | |
import ReactModal from "react-modal"; | |
import "react-toastify/dist/ReactToastify.css"; | |
import "./index.css"; | |
import { init_i18n } from "./i18n"; | |
import { Providers } from "./Providers"; | |
import { App } from "./app/App"; |
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
from [768] | |
import [759] | |
const [596] | |
t [446] | |
d [441] | |
c [405] | |
div [376] | |
x [353] | |
v [335] | |
s [331] |
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 Message = { | |
userId: string; | |
tokens: { v: string; t: "text" | "mention" | string }[]; | |
sentAt: string; | |
isWhisper: false; | |
id: string; | |
displayName: string; | |
avatarUrl: 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
const message = { | |
userId: '8f77004b-011d-4c6a-9104-05cbe843ab43', | |
tokens: [ | |
{ v: 'wanted', t: 'text' }, | |
{ v: 'to', t: 'text' }, | |
{ v: 'suggest', t: 'text' }, | |
{ v: 'a', t: 'text' }, | |
{ v: 'API', t: 'text' }, | |
{ v: 'documentation', t: 'text' }, | |
{ v: 'tool', t: 'text' }, |
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 { CommandInput } from "./CommandInput"; | |
import { getUser, setMonies } from "../totallyARealDB"; | |
import { addMessageToQueue } from "../queue"; | |
export async function coinflip({ wrapper, msg, userId }: CommandInput) { | |
if (msg.tokens[1]) { | |
const user = getUser(userId); | |
const amount = parseInt(msg.tokens[1].v as string, 10); | |
if (typeof amount === "number") { | |
if (amount > 0) { |
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
export type PopularRooms = { | |
rooms: { | |
voiceServerId: string; | |
peoplePreviewList: { | |
numFollowers: number; | |
id: string; | |
displayName: string; | |
}[]; | |
numPeopleInside: number; | |
name: 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 db from "../libs/database"; | |
import { DBUserProfile } from "./types"; | |
const getUser = (id: string): Promise<DBUserProfile> => | |
new Promise((res, rej) => | |
db | |
.ref("users") | |
.orderByChild("id") | |
.equalTo(id) | |
.once("value", (snap) => { |
OlderNewer