Path | Description |
---|---|
/home/minecraft_server/ |
The Minecraft server itself |
/home/minecraft_server/run.sh |
The script to start the server |
/home/minecraft_server/server.properties |
The server properties file |
`/home/to |
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 { inspect } from "node:util"; | |
import kleur from "kleur"; | |
kleur.enabled = true; | |
inspect.defaultOptions.depth = 10; | |
inspect.defaultOptions.maxArrayLength = 100; | |
interface ILoggerAdapter { | |
debug(prefix: string, message: string, ...args: any[]): void; |
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
/* | |
37 - ArrowUp | |
38 - ArrowDown | |
39 - ArrowRight | |
40 - ArrowLeft | |
32 - Space | |
33 - PageUp | |
34 - PageDown | |
35 - End | |
36 - Home |
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 { FormGroup, FormArray, FormControl } from '@angular/forms'; | |
import { InputMaybe } from '@generated/graphql'; | |
type ExtractTypeFromInputMaybe<T> = NonNullable<T> extends InputMaybe<infer U> ? U : T; | |
type FormularizeRecord<T> = | |
ExtractTypeFromInputMaybe<T> extends Record<string, unknown> | |
? FormGroup<{ [K in keyof T]: FormularizeObject<NonNullable<T[K]>> }> | |
: never; |
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 { IPaginatedType } from "@common/generics/paginated.type"; | |
import { useConnection } from "@common/utils/connection"; | |
import { paginated } from "@common/utils/paginated"; | |
import { PrismaService } from "@infra/prisma/pprisma.service"; | |
import { Prisma } from "@prisma/client"; | |
import { Result } from "@prisma/client/runtime/library"; | |
type PrismaModelsUnion = Prisma.TypeMap["meta"]["modelProps"]; | |
// Get the model type from the prisma client based on the model name |
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 class Timestamp { | |
public static SECOND_IN_MILLISECONDS = 1000; | |
public static MINUTE_IN_MILLISECONDS = 60 * Timestamp.SECOND_IN_MILLISECONDS; | |
public static HOUR_IN_MILLISECONDS = 60 * Timestamp.MINUTE_IN_MILLISECONDS; | |
public static DAY_IN_MILLISECONDS = 24 * Timestamp.HOUR_IN_MILLISECONDS; | |
private readonly _timestampMilliseconds: number; | |
private constructor(timestampMilliseconds: number) { | |
this._timestampMilliseconds = timestampMilliseconds; |
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
cd ~ | |
mkdir sslcertificates | |
openssl req -x509 -newkey rsa:4096 -keyout privatekey.pem -out certificate.pem -days 365 -nodes -subj '/CN=localhost' |
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 metaUrl = Reflect.has(globalThis, 'require') ? import.meta.url : pathToFileURL(__filename); |
https://transparencyreport.google.com/transparencyreport/api/v3/safebrowsing/status?site=domainhere
:
When we get the results from the endpoint above, the actual results we want will be on the 3rd line.
The first line will contain )]}'
, and the second line will be blank. Ignore both of those lines and get the results from the 3rd line.
)]}'
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 { readdirSync, readFileSync, writeFileSync } from "fs"; | |
import { setTimeout } from "timers/promises"; | |
const APPLICATION_ID = "APPLICATION_ID"; | |
const TOKEN = | |
"BOT_TOKEN"; | |
const discordApiUrl = `https://discord.com/api/v10/applications/${APPLICATION_ID}/emojis`; | |
const headers = { |
NewerOlder