Skip to content

Instantly share code, notes, and snippets.

View PuruVJ's full-sized avatar
🏠
I'm just a simple man trying to quit Vim

Puru Vijay PuruVJ

🏠
I'm just a simple man trying to quit Vim
View GitHub Profile
@PuruVJ
PuruVJ / __passport__.md
Created June 16, 2026 13:04
🔒 Auto-generated by Passport — do not edit or delete. Proof that this GitHub account controls an AT Protocol identity.

AT Protocol Passport

This GitHub account is linked to an AT Protocol (atproto) identity. Passport generated this gist automatically to prove that link — do not edit or delete it.

did=did:plc:5iqboysibcto44njndtbakjl
nonce=passport-ad12ea6a-0d9f-486f-a127-83cc0fec17b5
@PuruVJ
PuruVJ / __passport__.md
Created June 16, 2026 12:53
🔒 Auto-generated by Passport — do not edit or delete. Proof that this GitHub account controls an AT Protocol identity.

AT Protocol Passport

This GitHub account is linked to an AT Protocol (atproto) identity. Passport generated this gist automatically to prove that link — do not edit or delete it.

did=did:plc:5iqboysibcto44njndtbakjl
nonce=passport-a3a6ebb9-d4f6-4cd7-88c3-7a88bda0ddbd
@PuruVJ
PuruVJ / __passport__.md
Created June 16, 2026 12:36
🔒 Auto-generated by Passport — do not edit or delete. Proof that this GitHub account controls an AT Protocol identity.

AT Protocol Passport

This GitHub account is linked to an AT Protocol (atproto) identity. Passport generated this gist automatically to prove that link — do not edit or delete it.

did=did:plc:5iqboysibcto44njndtbakjl
nonce=passport-3e21a0f3-6f12-498a-b197-07a646b54b2a
@PuruVJ
PuruVJ / __passport__.md
Last active June 16, 2026 11:53
🔒 Auto-generated by Passport — do not edit or delete. Proof that this GitHub account controls an AT Protocol identity.

AT Protocol Passport

This GitHub account is linked to an AT Protocol (atproto) identity. Passport generated this gist automatically to prove that link — do not edit or delete it.

did=did:plc:5iqboysibcto44njndtbakjl

http://127.0.0.1:5173

did:plc:5iqboysibcto44njndtbakjl
const createFieldProxy = (remote, path = []) =>
new Proxy({}, {
get: (target, prop) => {
if (typeof prop === 'symbol') return undefined
if (prop === 'value' || prop === 'set' || prop === 'as' || prop === 'issues') {
let remoteField = remote.fields
for (const key of path) {
remoteField = remoteField?.[key]
if (!remoteField) return undefined
<script lang="ts">
import { draggable, ghost } from '@neodrag/svelte';
import { droppable } from '@neodrag/svelte/drop';
let tasks = $state([
{ id: '1', title: 'Task 1', column: 'todo' },
{ id: '2', title: 'Task 2', column: 'todo' },
{ id: '3', title: 'Task 3', column: 'done' },
]);
import { replaceState } from '$app/navigation';
import { page } from '$app/state';
import { tick } from 'svelte';
export function box<T>(getter: () => T, setter?: (value: T) => void) {
let derived_val = $derived(getter());
$effect(() => {
setter?.($state.snapshot(derived_val) as T);
});
export class EventEmitter {
#events: Map<string, Set<Function>> = new Map();
on(event: string, callback: Function): void {
let callbacks = this.#events.get(event);
if (!callbacks) {
callbacks = new Set();
this.#events.set(event, callbacks);
}
callbacks.add(callback);
import { parse, type Literal } from 'acorn';
import { type Node } from 'estree-walker';
import { walk } from 'zimmerframe';
const ast = parse(output, {
ecmaVersion: 2022,
sourceType: 'module',
sourceFile: full_path,
});