| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| const MEMORY_SIZE = 1_000_000; | |
| type Memory = any[] | |
| type registerName = 'stackPointer' | |
| | 'instructionPointer' | |
| | 'returnValue' | |
| | 'general'; | |
| interface Processor { | |
| halted: boolean; |
See the new site: https://postgresisenough.dev
Consider this gist to be deprecated. It's full of information that may or may not be correct, given recent findings. Consider the in-development PIDDatabase, and UMSKT, instead: https://umskt.github.io/PIDDatabase-viewer https://github.com/UMSKT/UMSKT
If you still want to see the old gist, see the last revision.
| // segments are all of the segments in all of the shapes in the scene | |
| // point is light point | |
| // viewport is top left, top right, bottom right, bottom left | |
| function getVisibilityPolygon(segments: Segment[], point: Point, viewport: Point[]) { | |
| const brokenSegments: Segment[] = [] | |
| const viewportMinCorner = viewport[0] | |
| const viewportMaxCorner = viewport[2] |
a thread where we can discuss some crazy routing ideas a bit out in the open branching out from the previous discussion on filesystem routes over at: https://discord.com/channels/815937377888632913/1014946079965454366
so, first of all, it seems there is a close alignment between how vite-plugin-ssr and router5 handles routing:
view === 'overview') @ https://vite-plugin-ssr.com/layouts#nested-layoutsroute === 'dashboard') @ https://youtu.be/hblXdstrAg0?t=197
maybe with the small exception that router5 has the explicit perspective of routes as app state whereas I didn't get the impression from vps that it's viewed as such (even though it technically is still state).I recommend watching this router5 talk from 2:45 - 7:50 https://youtu.be/hblXdstrAg0?t=165 since it's really key to how I think about view / state separation, and I think of routing as a state separate from the view. (After all, and especially in a client-rendered app, what page it is showing is certainly a major part
| import { Prisma, PrismaClient } from '@prisma/client'; | |
| import { exec } from 'child_process'; | |
| import * as util from 'util'; | |
| const execPromisify = util.promisify(exec); | |
| const prisma = new PrismaClient(); | |
| const tables = Prisma.dmmf.datamodel.models | |
| .map((model) => model.dbName) | |
| .filter((table) => table); |
| ### | |
| ### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
| ###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
| ###. things to watch out for: | |
| ### - Check out the `nix-darwin` instructions, as they have changed. | |
| ### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
| ### | |
| # I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
| # So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
https://github.com/spieglt/cloaker - password-based file encryptor (NOTE: uses Qt)
https://github.com/str4d/rage - file encryption tool and librarary that uses the age format
https://github.com/mohanson/gameboy - gameboy emulator
https://github.com/bartwillems/lyriek - fetch the lyrics of a song playing in an mpris-compatible player
https://github.com/JakeStanger/mpd-discord-rpc - discordrpc for mpd
| package main | |
| import ( | |
| "context" | |
| "database/sql" | |
| "fmt" | |
| "io" | |
| "log" | |
| "math/rand" | |
| "net/http" |