divot — лунка, пробой
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
| The typed way is openapi-fetch's requestInitExt option combined with an undici Agent. There are no as casts and no any, and all of the certificate settings are type-checked by undici's own types. | |
| // mtlsClient.ts | |
| import { readFileSync } from "node:fs"; | |
| import createClient, { type Client } from "openapi-fetch"; | |
| import { Agent, type RequestInit as UndiciRequestInit } from "undici"; | |
| import type { paths } from "./generated/api"; // your openapi-typescript output | |
| export interface MtlsClientOptions { | |
| baseUrl: 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
| # Prompt: diagnose the macOS plugin-does-not-persist issue | |
| Paste everything below the line into Claude Code on the macOS machine. | |
| --- | |
| The kyrio plugin does not survive a restart on this Mac. Every time I quit Claude Code | |
| and reopen it, the plugin is gone or switched off. The same plugin, from the same | |
| marketplace, stays installed and enabled across restarts on two Windows machines. | |
| Find the root cause and fix it for good. |
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
| // TS | |
| function test<T extends unknown>(actual: T, expected: T, text?: string): void { | |
| function difference<D>(a: Set<D>, b: Set<D>) { | |
| const arr: D[] = []; | |
| a.forEach(d => arr.push(d)); | |
| return new Set<D>(arr.filter(x => !b.has(x))); | |
| } | |
| function same<S extends unknown>(o1: S, o2: S): boolean { | |
| const t1 = typeof o1; | |
| const t2 = typeof o2; |
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
| function createQueue() { | |
| let head = undefined; | |
| let tail = head; | |
| function isEmpty() { return head === undefined; } | |
| function push(value) { | |
| const newElement = { next: undefined, value }; | |
| if (!tail) { | |
| head = newElement; | |
| tail = newElement; |
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
| function createStack() { | |
| const empty = { next: undefined, value: undefined! }; | |
| let top = empty; | |
| function isEmpty() { return top === empty; } | |
| function push(v) { top = { next: top, value: v }; } | |
| function pop() { | |
| if (!top.next) throw new Error('Can not pop from empty'); | |
| const { value } = top; | |
| top = top.next; | |
| return value; |
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
| function sumUp(t) { | |
| const classes = t.split('\n').filter(l => l?.length > 9); | |
| const r = /\((?<minutes>\d+)\:(?<seconds>\d+)(\s\))/; | |
| const totalSeconds = classes | |
| // parse each line | |
| .map(s => r.exec(s)?.groups) | |
| // ignore unparsed | |
| .filter(Boolean) | |
| // convert to seconds |
I hereby claim:
- I am another-guy on github.
- I am anotherguy (https://keybase.io/anotherguy) on keybase.
- I have a public key whose fingerprint is BA83 F183 5AD6 EB4E 8CBB FFB9 6156 FBC1 FEC5 5898
To claim this, I am signing this object:
| Name | What's there | Address |
|---|---|---|
| Get Hot Yoga | Warm Vinyasa. Hot Hatha. | 27203 216th Ave SE Suite 7 :: Maple Valley, WA 98038 |
| Elev8 | Vinyasa. Hatha. Pilates. | 2000 314th Street :: Federal Way, Washington 98003 |
| evolve | Vinyasa Flow | 223 1st Ave S :: Kent, WA 98032 |
| lonevita | Ashtanga ...? | 201 Auburn Way N Suite A :: Auburn, WA, 98002 |
| corestar pilates | ??? | 205 East Main Street :: Suite B Auburn, WA 98002 |
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
| alias cs="less ~/.cheat-sheet.txt" | |
| alias gbl="git blame " | |
| alias gch="git checkout " | |
| alias gchb="git checkout -b " | |
| alias gcl="git clone " | |
| alias gcm="git commit " | |
| alias gcma="git commit --amend " | |
| alias gcp="git cherry-pick " | |
| alias gdd="git add " | |
| alias gdf="git diff " |
NewerOlder