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 { createCipheriv, createDecipheriv, randomBytes } from 'crypto' | |
import process from 'node:process' | |
import { CustomError } from 'ts-custom-error' | |
import { z } from 'zod' | |
export const environment = z | |
.object({ | |
PAGINATION_SECRET_KEY: z.string().min(1) | |
}) | |
.parse(process.env) |
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 { Observable, Subscriber } from 'rxjs' | |
/** | |
* Converts an `AsyncIterableIterator` into an RxJS `Observable`. | |
* | |
* The function iterates over the async iterator and emits its values | |
* through `observer.next()`. When the subscription is terminated | |
* (via `unsubscribe()`), the iterator's `return()` method is called | |
* (if available) to release resources. | |
* It is important, because native RxJS `from` operator don't do this |
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
Show hidden characters
{ | |
"compilerOptions": { | |
// Strict Checks | |
"alwaysStrict": true, | |
"noImplicitAny": true, | |
"strictNullChecks": true, | |
"useUnknownInCatchVariables": true, | |
"strictPropertyInitialization": true, | |
"strictFunctionTypes": true, | |
"noImplicitThis": true, |
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 SCHEMA IF NOT EXISTS wallet; | |
CREATE TABLE wallet.segment | |
( | |
id smallint NOT NULL, | |
code text NOT NULL, | |
PRIMARY KEY (id) INCLUDE (code), | |
UNIQUE (code) INCLUDE (id) | |
); |
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
#include https://get.docker.com |
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
#cloud-config | |
package_update: true | |
package_upgrade: true | |
package_reboot_if_required: true | |
manage-resolv-conf: true | |
resolv_conf: | |
nameservers: | |
- '8.8.8.8' |