FROM postgres:14
RUN apt-get update && apt-get upgrade -y
ENV build_deps ca-certificates \
git \
build-essential \
libpq-dev \
postgresql-server-dev-14
RUN apt-get install -y --no-install-recommends $build_deps
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
| /** | |
| * Kysely + Effect integration. | |
| * | |
| * Effect v4 removed the `@effect/sql-kysely` package, so this is a port of it. | |
| * The technique is unchanged: Kysely runs with a dummy driver and its query | |
| * builders are given the Effect protocol, so `db.selectFrom(...)` is itself an | |
| * `Effect` that compiles the builder and runs the SQL through the active | |
| * `SqlClient`. A `Proxy` supplies the per-query execution effect, which is why | |
| * plugin tracking and `withTransaction` survive the builder chain. | |
| */ |
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 { PGlite } from "@electric-sql/pglite"; | |
| import { Kysely, DummyDriver, PostgresAdapter, PostgresIntrospector, PostgresQueryCompiler, sql } from "kysely"; | |
| import { jsonArrayFrom } from "kysely/helpers/postgres"; | |
| interface Database { | |
| event: { id: number; name: string; slug: string; description: string | null; startDate: Date | null; endDate: Date | null }; | |
| track: { id: number; eventId: number; name: string; slug: string; color: string | null; startingPoint: string; endPoint: string; path: string }; | |
| checkpoint: { id: number; trackId: number; name: string; abbreviation: string | null; point: string }; | |
| } |
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
| #!/usr/bin/env bun | |
| /** | |
| * Walks Claude Code, opencode, codex, and copilot session storage and | |
| * extracts every message the user actually typed (not tool output, not | |
| * system-injected instructions/reminders). | |
| * | |
| * Incremental: a state file tracks how far each source has been read | |
| * (byte offset + mtime for jsonl logs, last-seen timestamp for sqlite | |
| * sources), so a rerun only fetches what's new since last time. Results | |
| * accumulate in a cache file; the public output is always fully |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Map to values array, array spread vs array.from </title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>object lookup vs map lookup</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
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
| begin; | |
| -- user accounts | |
| create extension if not exists citext; | |
| create table users ( | |
| user_id int primary key generated always as identity, | |
| username citext unique not null, | |
| created_at timestamptz not null default now() | |
| ); |
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
| -- {{{ libraries | |
| local gears = require('gears') | |
| local awful = require('awful') | |
| awful.autofocus = require('awful.autofocus') | |
| -- Widget and layout library | |
| local wibox = require('wibox') | |
| -- Theme handling library | |
| local beautiful = require('beautiful') | |
| -- Notification library | |
| local naughty = require('naughty') |
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
| -- Set <space> as the leader key | |
| -- See `:help mapleader` | |
| -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) | |
| vim.g.mapleader = " " | |
| vim.g.maplocalleader = " " | |
| vim.g.loaded_netrwPlugin = 1 | |
| vim.opt.autoread = true | |
| vim.opt.backspace = "indent,eol,start" -- backspace over everything | |
| vim.opt.colorcolumn = { 80 } -- highlight 80th column |
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
| #!/usr/bin/env bash | |
| declare loud=0 | |
| declare urgent | |
| declare old_volume | |
| declare old_volume | |
| cleanup() { | |
| set_volume "$old_volume" |
NewerOlder