- Address the user as Cam.
- Optimize for correctness and long-term leverage, not agreement.
- Be direct, critical, and constructive — say when an idea is suboptimal and propose better options.
- Assume staff-level technical context unless told otherwise.
# x is introduced to the environment
{ ..?e } → { x := 3 ; ..?e }
# y too ; ?e is not the same row variable as the one above
{ ..?e } → { y := 5 ; ..?e }
# matching the current context on one that contains an x and a y
# which allows us to add them to introduce y
{ x ; y ; ..?e } → { z := x + y ; ..?e }
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
| local function start_tsgo() | |
| local root_files = { "tsconfig.json", "jsconfig.json", "package.json", ".git" } | |
| local paths = vim.fs.find(root_files, { stop = vim.env.HOME }) | |
| local root_dir = vim.fs.dirname(paths[1]) | |
| if root_dir == nil then | |
| -- root directory was not found | |
| return | |
| end |
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
| // 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
| // You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
| (() => { | |
| const SHOW_SIDES = false; // color sides of DOM nodes? | |
| const COLOR_SURFACE = true; // color tops of DOM nodes? | |
| const COLOR_RANDOM = false; // randomise color? | |
| const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
| const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
| const THICKNESS = 20; // thickness of layers | |
| const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
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
| // Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406 | |
| import { sql } from "drizzle-orm"; | |
| const clearDb = async (): Promise<void> => { | |
| const query = sql<string>`SELECT table_name | |
| FROM information_schema.tables | |
| WHERE table_schema = 'public' | |
| AND table_type = 'BASE TABLE'; | |
| `; |
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 type { Kysely, RawBuilder } from "kysely"; | |
| import type { Account } from "next-auth"; | |
| import type { | |
| Adapter, | |
| AdapterSession, | |
| VerificationToken, | |
| AdapterUser, | |
| } from "next-auth/adapters"; | |
| import type { DB } from "shared"; |
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
| // Place your key bindings in this file to override the defaults | |
| [ | |
| { | |
| "key": "ctrl+h", | |
| "command": "workbench.action.focusLeftGroup", | |
| "when": "editorTextFocus && vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "ctrl+l", | |
| "command": "workbench.action.focusRightGroup", |
NewerOlder
