Skip to content

Instantly share code, notes, and snippets.

View curiousluke93x's full-sized avatar

Luke Cohen curiousluke93x

View GitHub Profile
Agreebase.com Signature Proof
Proof version: 2
Agreement: AGR-F4AP-9JF8-BGKX-APF4
Version: 3
Method: github_gist
Session: ba07450b-f502-44c5-8e57-90c4f0dbe401
Proof ID: iO-MuJGHPQiaWaCCqOCintTHOewYZVa6
Issued at: 2026-07-26T13:43:54Z
Expires at: 2026-07-26T14:43:54Z
Document hash: sha256:4f5ef14c9a95b256cdbb4acead96cf9abbc5d7e4286cf5ba32e31b585a06f3f1
Agreebase.com Signature Proof
Proof version: 2
Notarization: AGR-XACE-BJAU-77X4-HGZX
Version: 1
Method: github_gist
Session: d6049c9c-7f46-4d6e-9328-c3d744c45b0b
Proof ID: MMQhaoAXmr6X6aawQ7lohQNrIaEjDU1P
Issued at: 2026-07-23T09:17:08Z
Expires at: 2026-07-23T10:17:08Z
Content hash: sha256:9bb5c9cde7df5fba2bfdba61ee0c21a01d91490c9d2fca54453300e0b264516d
@curiousluke93x
curiousluke93x / MotionDraftController.php
Created May 13, 2026 13:28
MotionDraftController Excerpt - generateFormattedFile creates live Word doc from LLM-generated PHPWord definition
private function generateFormattedFile(MotionDraft $draft)
{
try {
$html = (new Parser())->toHtml(is_string($draft->current_content) ? json_decode($draft->current_content, true) : $draft->current_content);
$rulesRaw = ($draft->interaction?->interactionable?->motionValidatorRequest ?? $draft->motionValidatorRequest)?->formatting_rules['formatting_rules'] ?? [];
$response = $this->llmService->makeLlmRequest($this->llmService->loadParsedPrompt('apply-formatting', ['FORMATTING_RULES' => json_encode($rulesRaw)]), 'grok-4-1-fast-non-reasoning-latest', 0.1, false, false);
$rules = $this->toolsService->parseLlmJson($response);
$phpConfig = $rules['php_config'] ?? [];
@curiousluke93x
curiousluke93x / apply-formatting.prompt
Created May 13, 2026 13:26
Generate PHPWord compliant JSON for live formatting of Word doc
You are a Legal Document Formatting Engine.
You will receive raw formatting rules (e.g., "CA Rule 2.100").
Your output must be a JSON object with two distinct parts:
1. "php_config": For page-level settings that CSS cannot handle.
- margins (integers, in twips. 1 inch = 1440)
- orientation ("portrait" or "landscape")
- page_numbering (boolean: true if rules imply paginated footer)
- line_numbering (boolean: true if pleading paper lines are requested)
AgreeBase signature proof
Agreement: AGR-XKMZ-33LZ
Version: 1
Method: github_gist
Session: 7ed4d29b-db6c-4473-821e-b234e32bd40c
Nonce: QXXf7OlAN4OzQL9gAVNCSs7t
AgreeBase signature proof
Agreement: AGR-UL4N-PPKD
Version: 1
Method: github_gist
Session: 85e17d19-0ca2-4d67-8b1d-21c5b361001b
Nonce: o6BLam7LV-ywhtulBmpjaiaf
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include<time.h>
#define B 8
#define E 32
#define H 64
#define V 27

Keybase proof

I hereby claim:

  • I am curiousluke93x on github.
  • I am curiousluke93x (https://keybase.io/curiousluke93x) on keybase.
  • I have a public key ASB5Aq-e_FWxfjTFywRV3iPs7os9t-ooqOs0b6KUJqTLvgo

To claim this, I am signing this object: