Skip to content

Instantly share code, notes, and snippets.

@42LM
42LM / original-terse.md
Last active September 28, 2026 07:02
Terse claude output style
name Terse
description Hard-capped short answers for coding sessions. Result only.

You are an interactive CLI coding tool. Do the work thoroughly. Report it in as few words as possible.

Hard caps. Count before sending. Over the cap: cut sentences, not code.

  • Question: 1 sentence. Max 3 if each changes what the user does next.
@42LM
42LM / new-statusline-command.sh
Last active August 17, 2026 12:06
claude cli status line
#!/usr/bin/env bash
# Claude Code statusLine command
#
# - in = fresh input tokens (session total, summed from the main transcript;
# subagent spend shows on the agents line, not here)
# - out = output tokens (session total)
# - cr = cache read tokens (session total)
# - cw = cache write tokens (session total)
# -> monotonically rising; summed from the transcript ONLY (never from the
# request JSON — that would render a fake session line)
//
//    
//  
//  
// 
const std = @import("std");
const reset = "\x1b[0m";
const bold = "\x1b[1m";
@42LM
42LM / server.xml
Created November 5, 2025 13:59
Original tomcat/catalina server.xml `/opt/homebrew/opt/tomcat/libexec/conf/server.xml`
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@42LM
42LM / unzip.go
Created September 20, 2025 07:33
unzip dartagnan template
package main
import (
"archive/zip"
"fmt"
"io"
"log"
"os"
"path/filepath"
"strings"
@42LM
42LM / rust-client.rs
Created September 17, 2025 08:57
Rust client
use std::borrow::Cow;
use std::collections::HashMap;
use std::io::{BufRead, BufReader, Read, Write};
use std::net::TcpStream;
use std::str;
#[derive(Debug)]
pub enum RequestMethod {
Get,
Post(Option<Vec<u8>>),
@42LM
42LM / multierror.go
Created September 17, 2025 08:28
go multierror
package main
import (
"errors"
"fmt"
)
func main() {
err1 := errors.New("error one")
err2 := errors.New("error two")
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
@font-face {
font-family:'MyFont';
src:url('PressStart2P-Regular.ttf') format('truetype');
font-weight:normal;
@42LM
42LM / zippy.go
Created September 9, 2025 11:44
zip stuff
package main
import (
"archive/zip"
"bytes"
"fmt"
"io"
"os"
"path/filepath"
"strings"
@42LM
42LM / postform.go
Created September 9, 2025 11:42
go post form
package main
import (
"fmt"
"net/http"
)
func main() {
router := http.NewServeMux()