Skip to content

Instantly share code, notes, and snippets.

@JosephScript
JosephScript / server.ts
Created March 8, 2024 16:46
fastify-hocuspocus
import { Server } from '@hocuspocus/server'
import Fastify from 'fastify'
import WebSocketPlugin from 'fastify-websocket'
const port = Number(process.env.PORT || 8800)
const host = '0.0.0.0'
// Initialize Fastify
const fastify = Fastify()
@JosephScript
JosephScript / generateEditorJson.ts
Created July 26, 2024 19:23
CraftJS generateEditorJson with only JSON
import { ROOT_NODE, UserComponent } from '@craftjs/core'
import { getRandomId } from '@craftjs/utils'
// We can infer the NodeConfig type from the UserComponent's props
type NodeConfig<T extends UserComponent> = {
node: T
props: React.ComponentProps<T>
}
@JosephScript
JosephScript / kitty.conf
Created March 3, 2026 19:03
~/.config/kitty/kitty.conf
# BEGIN_KITTY_THEME
# Tokyo Night
include current-theme.conf
# END_KITTY_THEME
# Set the shell to zsh
shell /usr/bin/zsh
# Enable splits layout
enabled_layouts splits
@JosephScript
JosephScript / current-theme.conf
Created March 4, 2026 12:38
tokyo night kitty theme
# vim:ft=kitty
## name: Tokyo Night
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf
background #1a1b26
foreground #c0caf5
@JosephScript
JosephScript / biome.json
Created March 4, 2026 14:29
Default biome settings
{
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},