- npm i jose
node jwe.js
| import { exec } from 'child_process'; | |
| import { promisify } from 'util'; | |
| import * as fs from 'fs/promises'; | |
| import path from 'path'; | |
| import { z } from 'zod'; | |
| import OpenAI from 'openai'; | |
| import { zodResponseFormat } from 'openai/helpers/zod'; | |
| const execAsync = promisify(exec); |
| /// <reference types="@sveltejs/kit" /> | |
| /// <reference no-default-lib="true"/> | |
| /// <reference lib="esnext" /> | |
| /// <reference lib="webworker" /> | |
| // https://kit.svelte.dev/docs/service-workers#type-safety | |
| const sw = self as unknown as ServiceWorkerGlobalScope; | |
| import { build, files, version } from '$service-worker'; |
So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.
Database in a browser, a spec (Stepan Parunashvili)
What problem are we trying to solve with a sync system?
The web of tomorrow (Nikita Prokopov)
| { | |
| "UserInfo": { | |
| "id": "#{USER_ID}", | |
| "email": "#{USER_EMAIL}", | |
| "first_name": "#{USER_FIRST_NAME}", | |
| "last_name": "#{USER_LAST_NAME}", | |
| "name": "#{USER_NAME}", | |
| "picture": "#{USER_PROFILE_PICTURE}", | |
| "roles": { | |
| "#{ROLE_NAME}": "#{ROLE_ID}" |
First, you have only one table to handle everything, in order to keep the model design and the data integrity at only one point.
This is the basic idea, you can extend the design with the created_by & updated_by columns if you need.
The following implementation is for MySQL, but the idea can be implemented at other kind of SQL databases too.
| <script context="module"> | |
| import { get, readable } from 'svelte/store' | |
| import { createClient, operationStore } from '@urql/svelte' | |
| import { browser, dev } from '$app/env' | |
| /** | |
| * @type {import('@sveltejs/kit').Load} | |
| */ |
This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.
Additional explanations:
Регулярное выражение для нахождения русского мата в тексте. Использовать следует только для первичной модерации, ибо обходится нажатием в одну клавишу. Если вам требуется полноценный фильтра мата, советую прибегнуть к программному пути создания такового, найти третье API, или просто остановиться на ручной модерации.
Выражение писалось в первую очередь с оглядкой на регулярки Java - для других языков может потребоваться адаптация.
\b(
((у|[нз]а|(хитро|не)?вз?[ыьъ]|с[ьъ]|(и|ра)[зс]ъ?|(о[тб]|п[оа]д)[ьъ]?|(.\B)+?[оаеи-])-?)?(
[её](б(?!о[рй]|рач)|п[уа](ц|тс))|
и[пб][ае][тцд][ьъ]| /******************************** | |
| * Module for generating and verifying JWT tokens | |
| * Designed to work on Cloudflare Workers | |
| * Should work in the browser or any env that supports Web Crypto API | |
| ********************************/ | |
| /******************************** | |
| * Key secret is a random Uint8Array of length 64 | |
| * See below for instructions on generating random values / keys | |
| ********************************/ |